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)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 13 Feb 2016 10:34:13 +0000 (10:34 +0000)
commit8d33fff4858afd802c90da36e2020641b1a9599b
treeac4e3016b60fbe45302e3d5eed57d10ce0ccd2b4
parentf1cf0b97e71d91b2b9d68540265133eb7711d3ed
crypto: algif_hash - Fix race condition in hash_check_key

commit ad46d7e33219218605ea619e32553daf4f346b9f upstream.

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

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
crypto/algif_hash.c