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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Feb 2016 20:31:04 +0000 (12:31 -0800)
commitaa51954b30e7d07522689452aba08b24f748a005
treef320ac8515b9790411eb7b973316dbc8060780bc
parent1bdbb041755b19975a9b87e22a02bd584a45e99c
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
crypto/algif_hash.c