mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-18 10:21:01 +03:00
0e765c4eb8
This is a typical case of use after free. We would call zfs_close(zhp) which would free the handle, and then call zfs_iter_children() on that handle later. This change ensures that the zfs_handle is only closed when we are ready to return. Running `zfs inherit -r sharenfs pool` was failing with an error code without any error messages. After some debugging I've pinpointed the issue to be memory corruption, which would cause zfs to try to issue an ioctl to the wrong device and receive ENOTTY. Reviewed-by: Paul Dagnelie <pcd@delphix.com> Reviewed-by: George Wilson <gwilson@delphix.com> Reviewed-by: Sebastien Roy <sebastien.roy@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alek Pinchuk <apinchuk@datto.com> Signed-off-by: Pavel Zakharov <pavel.zakharov@delphix.com> Issue #7967 Closes #9165 |
||
---|---|---|
.. | ||
.gitignore | ||
libzfs_changelist.c | ||
libzfs_config.c | ||
libzfs_core.pc.in | ||
libzfs_crypto.c | ||
libzfs_dataset.c | ||
libzfs_diff.c | ||
libzfs_import.c | ||
libzfs_iter.c | ||
libzfs_mount.c | ||
libzfs_pool.c | ||
libzfs_sendrecv.c | ||
libzfs_status.c | ||
libzfs_util.c | ||
libzfs.pc.in | ||
Makefile.am | ||
THIRDPARTYLICENSE.openssl | ||
THIRDPARTYLICENSE.openssl.descrip |