Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755397AbdIRJhW convert rfc822-to-8bit (ORCPT ); Mon, 18 Sep 2017 05:37:22 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:46750 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755273AbdIRJhU (ORCPT ); Mon, 18 Sep 2017 05:37:20 -0400 From: Lionel DEBIEVE To: Arnd Bergmann CC: Herbert Xu , "David S. Miller" , Maxime Coquelin , "Alexandre TORGUE" , "linux-crypto@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/2] crypto: stm32 - Fix uninitialized data usage Thread-Topic: [PATCH 1/2] crypto: stm32 - Fix uninitialized data usage Thread-Index: AQHTK6tjohATjLf9pkGozF+FTK57LKK6Sl0A Date: Mon, 18 Sep 2017 09:36:37 +0000 Message-ID: References: <20170912093553.2580986-1-arnd@arndb.de> In-Reply-To: Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.75.127.47] Content-Type: text/plain; charset="Windows-1252" Content-ID: <7E6A0ADEB34A3A46AEE82175206C4476@st.com> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-09-18_02:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2364 Lines: 59 Hi Arnd, I've already push this fix for review last month, waiting the ack. " From: Lionel Debieve To: Herbert Xu , "David S . Miller" , Maxime Coquelin , Alexandre Torgue , , , CC: Benjamin Gaignard , Fabien Dessenne , Ludovic Barre Subject: [PATCH 1/1] crypto: stm32/hash - Remove uninitialized symbol Date: Fri, 18 Aug 2017 15:54:01 +0200 " Sorry if you receive this mail twice, I didn't see any mail in the mailing list, maybe server issue. I'm reviewing your second part patch. BR, Lionel > On 09/12/2017 11:35 AM, Arnd Bergmann wrote: >> The error handling in stm32_hash_irq_thread passes >> uninitialized data into stm32_hash_finish_req, as gcc >> points out: >> drivers/crypto/stm32/stm32-hash.c: In function 'stm32_hash_irq_thread': >> drivers/crypto/stm32/stm32-hash.c:1088:2: error: 'err' may be used uninitialized in this function [-Werror=maybe-uninitialized] >> I could not tell what data should be passed there instead, >> so this changes the code to always pass zero, making it >> well-defined, though possibly still wrong. Please check. >> Signed-off-by: Arnd Bergmann >> --- >> drivers/crypto/stm32/stm32-hash.c | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c >> index b585ce54a802..3c23a23e9ee5 100644 >> --- a/drivers/crypto/stm32/stm32-hash.c >> +++ b/drivers/crypto/stm32/stm32-hash.c >> @@ -1067,7 +1067,6 @@ static int stm32_hash_cra_sha256_init(struct crypto_tfm *tfm) >> static irqreturn_t stm32_hash_irq_thread(int irq, void *dev_id) >> { >> struct stm32_hash_dev *hdev = dev_id; >> - int err; >> >> if (HASH_FLAGS_CPU & hdev->flags) { >> if (HASH_FLAGS_OUTPUT_READY & hdev->flags) { >> @@ -1085,7 +1084,7 @@ static irqreturn_t stm32_hash_irq_thread(int irq, void *dev_id) >> >> finish: >> /*Finish current request */ >> - stm32_hash_finish_req(hdev->req, err); >> + stm32_hash_finish_req(hdev->req, 0); >> >> return IRQ_HANDLED; >> } >