diff options
author | Tim Chase <[email protected]> | 2016-05-02 12:00:50 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-05-02 10:00:50 -0700 |
commit | ddab862d4cb860c6067b50ed2d040ac6d0f96b65 (patch) | |
tree | 95e9c21870f875670e41357b8547c638f3cb6025 | |
parent | ef1c27117beae38fb87372b914ed9898ba7ef748 (diff) |
Enable PF_FSTRANS for ioctl secpolicy callbacks (#4571)
At the very least, the zfs_secpolicy_write_perms ioctl security policy
callback, which calls dsl_dataset_hold(), can require freeing memory and,
therefore, re-enter ZFS. This patch enables PF_FSTRANS for all of the
security policy callbacks similarly to the manner in which it's enabled
for the actual ioctl callback.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #4554
-rw-r--r-- | module/zfs/zfs_ioctl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index 50f6a7a2c..6cc50e6da 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -5829,8 +5829,11 @@ zfsdev_ioctl(struct file *filp, unsigned cmd, unsigned long arg) } - if (error == 0 && !(flag & FKIOCTL)) + if (error == 0 && !(flag & FKIOCTL)) { + cookie = spl_fstrans_mark(); error = vec->zvec_secpolicy(zc, innvl, CRED()); + spl_fstrans_unmark(cookie); + } if (error != 0) goto out; |