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)
committerSasha Levin <sasha.levin@oracle.com>
Wed, 3 Feb 2016 21:23:19 +0000 (16:23 -0500)
commit3a1e81ad84e4d880b00ecf7ad8d03b9b772ddfa7
treec4d08914bca51ca9be9f0a3e950125cf7401cad5
parent8515819fff8fce56be067af985016b6356d1fe5e
crypto: algif_hash - Fix race condition in hash_check_key

[ Upstream commit ad46d7e33219218605ea619e32553daf4f346b9f ]

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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
crypto/algif_hash.c