]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/dsl_crypt.c
Fix hash_lock / keystore.sk_dk_lock lock inversion
authorBrian Behlendorf <behlendorf1@llnl.gov>
Sun, 4 Feb 2018 22:07:13 +0000 (14:07 -0800)
committerGitHub <noreply@github.com>
Sun, 4 Feb 2018 22:07:13 +0000 (14:07 -0800)
commit0d23f5e2e4532718ce26ec8411140759cf2367e2
tree11024486cc8058473b75c0583dea4150228bc77b
parentfbd42542686af053f0d162ec4630ffd4fff1cc30
Fix hash_lock / keystore.sk_dk_lock lock inversion

The keystore.sk_dk_lock should not be held while performing I/O.
Drop the lock when reading from disk and update the code so
they the first successful caller adds the key.

Improve error handling in spa_keystore_create_mapping_impl().

Reviewed by: Thomas Caputi <tcaputi@datto.com>
Reviewed-by: RageLtMan <rageltman@sempervictus>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #7112
Closes #7115
module/zfs/dsl_crypt.c