Re: [PATCH] Crypto: Don't use err uninitialized in algif_hash.c:hash_sendmsg()

2011-06-27 Thread Jesper Juhl
On Mon, 27 Jun 2011, Herbert Xu wrote: > On Sun, Jun 26, 2011 at 11:23:06PM +0200, Jesper Juhl wrote: > > If af_alg_make_sg() returns <0 in hash_sendmsg() we'll jump to the > > 'unlock' label without having set 'err' to anything. At the 'unlock' > > label the value of 'err' is tested to determine

Re: [PATCH] Crypto: Don't use err uninitialized in algif_hash.c:hash_sendmsg()

2011-06-27 Thread Herbert Xu
On Sun, Jun 26, 2011 at 11:23:06PM +0200, Jesper Juhl wrote: > If af_alg_make_sg() returns <0 in hash_sendmsg() we'll jump to the > 'unlock' label without having set 'err' to anything. At the 'unlock' > label the value of 'err' is tested to determine return value of the > function - not good to bas

Re: [PATCH] Crypto: Don't use err uninitialized in algif_hash.c:hash_sendmsg()

2011-06-26 Thread David Miller
From: Jesper Juhl Date: Sun, 26 Jun 2011 23:23:06 +0200 (CEST) > If af_alg_make_sg() returns <0 in hash_sendmsg() we'll jump to the > 'unlock' label without having set 'err' to anything. At the 'unlock' > label the value of 'err' is tested to determine return value of the > function - not good to

[PATCH] Crypto: Don't use err uninitialized in algif_hash.c:hash_sendmsg()

2011-06-26 Thread Jesper Juhl
If af_alg_make_sg() returns <0 in hash_sendmsg() we'll jump to the 'unlock' label without having set 'err' to anything. At the 'unlock' label the value of 'err' is tested to determine return value of the function - not good to base that on a uninitialized variable. This patch sets 'err' to the ret