]> git.proxmox.com Git - mirror_zfs.git/commit
Always call rw_init in zio_crypt_key_unwrap
authorJorgen Lundman <lundman@lundman.net>
Wed, 10 Apr 2019 22:39:40 +0000 (07:39 +0900)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 10 Apr 2019 22:39:40 +0000 (15:39 -0700)
commit48ed0f9da0389f3ad44e494b00055c8563f961a1
tree311279b2c75da26536051eed845cc52f76729c67
parent8cb34421e0bf1fea316d16014483d61381a41f57
Always call rw_init in zio_crypt_key_unwrap

The error path in zio_crypt_key_unwrap would call zio_crypt_key_destroy which
calls rw_destroy(&key->zk_salt_lock); which has not yet been initialized.

We move the rw_init() call to the start of zio_crypt_key_unwrap instead.

Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Jorgen Lundman <lundman@lundman.net>
Closes #8604
Closes #8605
module/zfs/zio_crypt.c