From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751980Ab1ARLmj (ORCPT ); Tue, 18 Jan 2011 06:42:39 -0500 Received: from e7.ny.us.ibm.com ([32.97.182.137]:41350 "EHLO e7.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750745Ab1ARLmh (ORCPT ); Tue, 18 Jan 2011 06:42:37 -0500 Subject: Re: [PATCH 3/3] trusted-keys: small cleanup From: Mimi Zohar To: Tetsuo Handa Cc: safford@watson.ibm.com, David Safford , jj@chaosbits.net, dhowells@redhat.com, jmorris@namei.org, keyrings@linux-nfs.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <1295350109.3426.29.camel@localhost.localdomain> References: <201101170041.p0H0ffFE086481@www262.sakura.ne.jp> <201101170044.p0H0iLQW087457@www262.sakura.ne.jp> <1295298400.2642.9.camel@localhost.localdomain> <201101180139.p0I1dh9T066040@www262.sakura.ne.jp> <1295342793.3426.12.camel@localhost.localdomain> <201101182003.ACH57348.HOtFMVOLJQSOFF@I-love.SAKURA.ne.jp> <1295350109.3426.29.camel@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" Date: Tue, 18 Jan 2011 06:42:28 -0500 Message-ID: <1295350948.3426.36.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 (2.30.3-1.fc13) Content-Transfer-Encoding: 7bit X-Content-Scanned: Fidelis XPS MAILER Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2011-01-18 at 06:28 -0500, Mimi Zohar wrote: > On Tue, 2011-01-18 at 20:03 +0900, Tetsuo Handa wrote: > > Mimi Zohar wrote: > > > > > va_end(argp); > > > > > - ret = crypto_shash_final(&sdesc->shash, paramdigest); > > > > > + if (!ret) > > > > > + ret = crypto_shash_final(&sdesc->shash, paramdigest); > > > > > if (!ret) > > > > > > Change the second '(!ret)' here, the crypto_shash_file() return code > > > test, from '(!ret)' to '(ret < 0)', like the other crypto_shash_file() > > > tests. > > > > Did you mean changing from > > > > if (!ret) > > ret = crypto_shash_final(&sdesc->shash, paramdigest); > > > > to > > > > if (ret < 0) > > ret = crypto_shash_final(&sdesc->shash, paramdigest); > > > > (i.e. invert the condition)? > > Wrong '(!ret)'. Instead of: > va_end(argp); > if (!ret) > ret = crypto_shash_final(&sdesc->shash, paramdigest); > if (!ret) > > do: > va_end(argp); > if (!ret) > ret = crypto_shash_final(&sdesc->shash, paramdigest); > if (ret < 0) > > > I'm confused. Would you make the patch by yourself? > > It's only for consistency, not that important. > > thanks, > > Mimi James, the original patch is fine as is. thanks, Mimi