From: David Howells Subject: Re: [PATCH 02/16] MPILIB: Add a missing ENOMEM check [ver #2] Date: Wed, 30 Nov 2011 17:00:01 +0000 Message-ID: <21008.1322672401@redhat.com> References: <4ED64B8B.1050806@canonical.com> <20111129234258.13625.21153.stgit@warthog.procyon.org.uk> <20111129234323.13625.34554.stgit@warthog.procyon.org.uk> Cc: dhowells@redhat.com, keyrings@linux-nfs.org, linux-crypto@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, dmitry.kasatkin@intel.com, zohar@linux.vnet.ibm.com, arjan.van.de.ven@intel.com, alan.cox@intel.com To: Serge Hallyn Return-path: Received: from mx1.redhat.com ([209.132.183.28]:47850 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757888Ab1K3RAN (ORCPT ); Wed, 30 Nov 2011 12:00:13 -0500 In-Reply-To: <4ED64B8B.1050806@canonical.com> Sender: linux-crypto-owner@vger.kernel.org List-ID: Serge Hallyn wrote: > > p = buffer = kmalloc(n, GFP_KERNEL); > > + if (p< 0) > > + return NULL; > > Sorry, maybe i'm having a confused morning, but shouldn't this check be for > p==NULL rather than p<0? Bah. You are, of course, right. Updated for the next version. David