]> git.proxmox.com Git - mirror_zfs.git/commit - configure.ac
Fix mmap / libaio deadlock
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 28 Mar 2018 17:19:22 +0000 (10:19 -0700)
committerGitHub <noreply@github.com>
Wed, 28 Mar 2018 17:19:22 +0000 (10:19 -0700)
commitb2ab468dded24a090dba9fc8396b3d394011ce14
tree52ce015e474ee028851256f3b423075b7cf73f58
parent668173b5764386b47de0beb7c57ff8ce8f68f983
Fix mmap / libaio deadlock

Calling uiomove() in mappedread() under the page lock can result
in a deadlock if the user space page needs to be faulted in.

Resolve the issue by dropping the page lock before the uiomove().
The inode range lock protects against concurrent updates via
zfs_read() and zfs_write().

Reviewed-by: Albert Lee <trisk@forkgnu.org>
Reviewed-by: Chunwei Chen <david.chen@nutanix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #7335
Closes #7339
14 files changed:
config/user-libaio.m4 [new file with mode: 0644]
config/user.m4
config/zfs-build.m4
configure.ac
module/zfs/zfs_vnops.c
rpm/generic/zfs.spec.in
tests/runfiles/linux.run
tests/zfs-tests/cmd/Makefile.am
tests/zfs-tests/cmd/mmap_libaio/.gitignore [new file with mode: 0644]
tests/zfs-tests/cmd/mmap_libaio/Makefile.am [new file with mode: 0644]
tests/zfs-tests/cmd/mmap_libaio/mmap_libaio.c [new file with mode: 0644]
tests/zfs-tests/include/commands.cfg
tests/zfs-tests/tests/functional/mmap/Makefile.am
tests/zfs-tests/tests/functional/mmap/mmap_libaio_001_pos.ksh [new file with mode: 0755]