crypto: algif_hash - Fix race condition in hash_check_key