HomeFreeBSD

Fix hash_lock / keystore.sk_dk_lock lock inversion

Description

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

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Feb 4 2018, 10:07 PM
GitHub <noreply@github.com>Committed on Feb 4 2018, 10:07 PM
Parents
rGfbd42542686a: Fix systemd_ RPM macros usage on Debian-based distributions
Branches
Unknown
Tags
Unknown