Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932684AbbGHTzu (ORCPT ); Wed, 8 Jul 2015 15:55:50 -0400 Received: from smtprelay0020.hostedemail.com ([216.40.44.20]:35548 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755550AbbGHTzm (ORCPT ); Wed, 8 Jul 2015 15:55:42 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3866:3871:4321:5007:6117:6238:6261:7514:8603:10004:10400:10848:11026:11232:11473:11658:11914:12043:12438:12517:12519:12555:12740:13019:13069:13311:13357:14096:14097:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: head34_31869d3158608 X-Filterd-Recvd-Size: 1827 Message-ID: <1436385339.2682.93.camel@perches.com> Subject: Re: [PATCH] ext4 crypto: remove unneeded assignation From: Joe Perches To: Laurent Navet Cc: tytso@mit.edu, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 08 Jul 2015 12:55:39 -0700 In-Reply-To: <1436385075-22559-1-git-send-email-laurent.navet@gmail.com> References: <1436385075-22559-1-git-send-email-laurent.navet@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1186 Lines: 38 On Wed, 2015-07-08 at 21:51 +0200, Laurent Navet wrote: > Return value of ext4_derive_key_aes() is stored but never used before > being overwritten. > Also fix coverity CID 1309760. > > Signed-off-by: Laurent Navet > --- > fs/ext4/crypto_key.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ext4/crypto_key.c b/fs/ext4/crypto_key.c > index 442d24e..92f9172 100644 > --- a/fs/ext4/crypto_key.c > +++ b/fs/ext4/crypto_key.c > @@ -218,7 +218,7 @@ retry: > BUILD_BUG_ON(EXT4_AES_128_ECB_KEY_SIZE != > EXT4_KEY_DERIVATION_NONCE_SIZE); > BUG_ON(master_key->size != EXT4_AES_256_XTS_KEY_SIZE); > - res = ext4_derive_key_aes(ctx.nonce, master_key->raw, > + ext4_derive_key_aes(ctx.nonce, master_key->raw, > raw_key); More likely this should be: res = ext4_derive_key_aes(,,,); if (res) goto out; > got_key: > ctfm = crypto_alloc_ablkcipher(cipher_str, 0, 0); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/