Re: [PATCH] padata: fix uninitialized return value in padata_replace()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 10, 2020 at 01:11:00PM -0500, Daniel Jordan wrote:
> According to Geert's report[0],
> 
>   kernel/padata.c: warning: 'err' may be used uninitialized in this
>     function [-Wuninitialized]:  => 539:2
> 
> Warning is seen only with older compilers on certain archs.  The
> runtime effect is potentially returning garbage down the stack when
> padata's cpumasks are modified before any pcrypt requests have run.
> 
> Simplest fix is to initialize err to the success value.
> 
> [0] http://lkml.kernel.org/r/20200210135506.11536-1-geert@xxxxxxxxxxxxxx
> 
> Reported-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Fixes: bbefa1dd6a6d ("crypto: pcrypt - Avoid deadlock by using per-instance padata queues")
> Signed-off-by: Daniel Jordan <daniel.m.jordan@xxxxxxxxxx>
> Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Cc: Steffen Klassert <steffen.klassert@xxxxxxxxxxx>
> Cc: linux-crypto@xxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> ---
>  kernel/padata.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux