Files
mirror_zfs/module/os/linux/zfs
Jorgen Lundman 4b629d04a5 Avoid calling rw_destroy() on uninitialized rwlock
First the function `memset(&key, 0, ...)` but
any call to "goto error;" would call zio_crypt_key_destroy(key) which
calls `rw_destroy()`. The `rw_init()` is moved up to be right after the
memset. This way the rwlock can be released.

The ctx does allocate memory, but that is handled by the memset to 0
and icp skips NULL ptrs.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Jorgen Lundman <lundman@lundman.net>
Closes #13976
2022-10-05 17:07:50 -07:00
..
2022-09-16 13:36:47 -07:00
2022-09-16 13:36:47 -07:00
2022-09-16 14:25:53 -07:00
2022-09-16 13:36:47 -07:00
2022-09-16 13:36:47 -07:00