From patchwork Thu Aug 18 22:42:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9289179 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C241E6086A for ; Fri, 19 Aug 2016 02:25:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2A122916D for ; Fri, 19 Aug 2016 02:25:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A734D29213; Fri, 19 Aug 2016 02:25:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5489F2920C for ; Fri, 19 Aug 2016 02:25:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753718AbcHSCXl (ORCPT ); Thu, 18 Aug 2016 22:23:41 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35836 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753709AbcHSCXY (ORCPT ); Thu, 18 Aug 2016 22:23:24 -0400 Received: by mail-pf0-f194.google.com with SMTP id h186so646096pfg.2 for ; Thu, 18 Aug 2016 19:23:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dj6XR1Bjs9L+Z1em/uJXKvH7fZ7inioPBULyPEsNgCQ=; b=c+989pMH4mAuCf3S1L/QEH/wey/8zbPrEYHcU/Ua3g7IJ8yN4zmMq7UeRM78wUHi3w 0pCg8wBe0cbYGTKG6Wqkkkvc0NqjZpp25d39gmhxBHdeG5MgHoLteEkW3+ntzURVmncd pN1XlUbUFPogf5Jbbhbves0p6ydJU16glggytc0++vqLcsk8Z3CIWDp1zWkd5+kXRC8k C5cKulC5O758qEWdLaUUtpG2kfmpeWurgmPzonVNRD4vtSh+2DD2npzoWyrIZOK/E0LM 6uuN4GkG/nn/ww6tjIRp32ArG/T5dizv9cJgSsTQtbsmUYOLz9kX5shxonWsDhqWjedA GznQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dj6XR1Bjs9L+Z1em/uJXKvH7fZ7inioPBULyPEsNgCQ=; b=UGOltnpPuEZ/ZMySK1j60smVP1fZt7bDuKkCmrPUvswVuAAezFNWjAtl/ttZ2Js7zW uPayohMpz6fk/Zv/b6lcuZJuc6O735ndUxW/ZGncinhDLq/mhUBc2jWPuCiDJz54yeyF 30exFR/2D180c6szURGq5cRusliMSwCK82h7sg1GKNNyHk1tF6h/QXoK/4gjL1hPGYMd +vXKtCWGM1AmIUYIYPNK6FywiwB/2+pTiPyZ4QjYxDAybmWaSFdVBMxicU3kj/wi8Vvw Vhv/9gvkRvik/EKcumw1jnTClHkfuiWwqX+3Vsa+ZHYSwpBwYLJ5dZiQFeCMZJ8GtWtH 9//Q== X-Gm-Message-State: AEkoout55vCmg0FxxBmlkZwfxF0CrS1g2tzyblnCxQx5vE/KlMUhiUjHBJkBmGEL1VfukA== X-Received: by 10.98.14.208 with SMTP id 77mr8156278pfo.23.1471560136905; Thu, 18 Aug 2016 15:42:16 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id i137sm1140749pfe.64.2016.08.18.15.42.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Aug 2016 15:42:16 -0700 (PDT) From: Wei Yongjun To: Corentin Labbe , Herbert Xu , "David S. Miller" , Maxime Ripard , Chen-Yu Tsai Cc: Wei Yongjun , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH -next] crypto: fix missing unlock on error in sun4i_hash() Date: Thu, 18 Aug 2016 22:42:10 +0000 Message-Id: <1471560130-5265-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the missing unlock before return from function sun4i_hash() in the error handling case. Fixes: 477d9b2e591b ("crypto: sun4i-ss - unify update/final function") Signed-off-by: Wei Yongjun --- drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-hash.c b/drivers/crypto/sunxi-ss/sun4i-ss-hash.c index 2ee3b59..de66f47 100644 --- a/drivers/crypto/sunxi-ss/sun4i-ss-hash.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-hash.c @@ -245,6 +245,7 @@ int sun4i_hash(struct ahash_request *areq) if (end > areq->nbytes || areq->nbytes - end > 63) { dev_err(ss->dev, "ERROR: Bound error %u %u\n", end, areq->nbytes); + spin_unlock(&ss->slock); return -EINVAL; } } else {