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
..
abd_os.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
arc_os.c Cleanup: Specify unsignedness on things that should not be signed 2022-09-27 16:42:41 -07:00
mmp_os.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
policy.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
qat_compress.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
qat_crypt.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
qat.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
spa_misc_os.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
trace.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
vdev_disk.c zed: mark disks as REMOVED when they are removed 2022-09-28 09:48:46 -07:00
vdev_file.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_acl.c Cleanup: Remove ineffective unsigned comparisons against 0 2022-09-26 17:02:38 -07:00
zfs_ctldir.c zfs_enter rework 2022-09-16 13:36:47 -07:00
zfs_debug.c Cleanup: Specify unsignedness on things that should not be signed 2022-09-27 16:42:41 -07:00
zfs_dir.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_file_os.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_ioctl_os.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_racct.c module: zfs: fix unused, remove argsused 2021-12-23 09:42:47 -08:00
zfs_sysfs.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_uio.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_vfsops.c Linux: Fix use-after-free in zfsvfs_create() 2022-09-19 17:30:58 -07:00
zfs_vnops_os.c zfs_enter rework 2022-09-16 13:36:47 -07:00
zfs_znode.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zio_crypt.c Avoid calling rw_destroy() on uninitialized rwlock 2022-10-05 17:07:50 -07:00
zpl_ctldir.c Fix double const qualifier declarations 2022-09-30 15:34:39 -07:00
zpl_export.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpl_file.c zfs_enter rework followup 2022-09-16 14:25:53 -07:00
zpl_inode.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpl_super.c zfs_enter rework 2022-09-16 13:36:47 -07:00
zpl_xattr.c zfs_enter rework 2022-09-16 13:36:47 -07:00
zvol_os.c Cleanup: Remove ineffective unsigned comparisons against 0 2022-09-26 17:02:38 -07:00