Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1534084

Re: [PATCH 1/1] crypto: set error code when kcalloc fails

From Herbert Xu <herbert@gondor.apana.org.au>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] crypto: set error code when kcalloc fails
Date 2016-12-01 14:30 +0100
Message-ID <sJzAZ-4ng-3@gated-at.bofh.it> (permalink)
References <sJpii-645-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Dec 01, 2016 at 10:04:43AM +0800, Pan Bian wrote:
> Fix bug https://bugzilla.kernel.org/show_bug.cgi?id=188521. In function
> skcipher_recvmsg_async(), variable err takes the return value, and its
> value should be negative on failures. Because variable err may be
> reassigned and checked before calling kcalloc(), its value may be 0
> (indicates no error) even if kcalloc() fails. This patch fixes the bug
> by explicitly assigning -ENOMEM to err when kcalloc() returns a NULL
> pointer.
> 
> Signed-off-by: Pan Bian <bianpan2016@163.com>

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/1] crypto: set error code when kcalloc fails Pan Bian <bianpan2016@163.com> - 2016-12-01 03:30 +0100
  Re: [PATCH 1/1] crypto: set error code when kcalloc fails Herbert Xu <herbert@gondor.apana.org.au> - 2016-12-01 14:30 +0100

csiph-web