crypto: algif_hash - Fix race condition in hash_check_key
Orabug:
23330757
[ 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>
(cherry picked from commit
3a1e81ad84e4d880b00ecf7ad8d03b9b772ddfa7)
Signed-off-by: Dan Duval <dan.duval@oracle.com>