crypto: algif_hash - Fix race condition in hash_check_key
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 15 Jan 2016 14:01:08 +0000 (22:01 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 18 Jan 2016 10:16:34 +0000 (18:16 +0800)
commitad46d7e33219218605ea619e32553daf4f346b9f
tree41d1566160c2dc875fab29865a8988e0fae4d05b
parentcbafd643be4c01d9df994175d5e2fa8b3b1b86bb
crypto: algif_hash - Fix race condition in hash_check_key

We need to lock the child socket in hash_check_key as otherwise
two simultaneous calls can cause the parent socket to be freed.

Cc: stable@vger.kernel.org
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/algif_hash.c