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


Groups > linux.kernel > #1628237

Re: [PATCH v2] crypto: chcr - Fix error handling related to 'chcr_alloc_shash'

From Herbert Xu <herbert@gondor.apana.org.au>
Newsgroups linux.kernel
Subject Re: [PATCH v2] crypto: chcr - Fix error handling related to 'chcr_alloc_shash'
Date 2017-04-21 15:20 +0200
Message-ID <tyGDD-6gr-1@gated-at.bofh.it> (permalink)
References <tvRFf-6Or-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Apr 13, 2017 at 08:25:15PM +0200, Christophe JAILLET wrote:
> Up to now, 'crypto_alloc_shash()' may return a valid pointer, an error
> pointer or NULL (in case of invalid parameter)
> Update it to always return an error pointer in case of error. It now
> returns ERR_PTR(-EINVAL) instead of NULL in case of invalid parameter.
> 
> This simplifies error handling.
> 
> Also fix a crash in 'chcr_authenc_setkey()' if 'chcr_alloc_shash()'
> returns an error pointer and the "goto out" path is taken.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

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 v2] crypto: chcr - Fix error handling related to 'chcr_alloc_shash' Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-04-13 20:30 +0200
  Re: [PATCH v2] crypto: chcr - Fix error handling related to  'chcr_alloc_shash' Herbert Xu <herbert@gondor.apana.org.au> - 2017-04-21 15:20 +0200

csiph-web