mirror_zfs/include/spl/sys
ilbsmart 779a6c0bf6 deadlock between mm_sem and tx assign in zfs_write() and page fault
The bug time sequence:
1. thread #1, `zfs_write` assign a txg "n".
2. In a same process, thread #2, mmap page fault (which means the
   `mm_sem` is hold) occurred, `zfs_dirty_inode` open a txg failed,
   and wait previous txg "n" completed.
3. thread #1 call `uiomove` to write, however page fault is occurred
   in `uiomove`, which means it need `mm_sem`, but `mm_sem` is hold by
   thread #2, so it stuck and can't complete,  then txg "n" will
   not complete.

So thread #1 and thread #2 are deadlocked.

Reviewed-by: Chunwei Chen <tuxoko@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Grady Wong <grady.w@xtaotech.com>
Closes #7939
2018-10-16 11:11:24 -07:00
..
acl.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
atomic.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
byteorder.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
callb.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
callo.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
cmn_err.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
condvar.h Linux 4.18 compat: inode timespec -> timespec64 2018-06-19 21:51:18 -07:00
console.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
cred.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
ctype.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
debug.h Fix ASSERT macros to not over-expand 2018-10-03 20:16:45 -07:00
disp.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
dkio.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
dkioc_free_util.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
errno.h Update build system and packaging 2018-05-29 16:00:33 -07:00
fcntl.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
file.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
inttypes.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
isa_defs.h Fix kernel unaligned access on sparc64 2018-07-11 13:10:40 -07:00
kmem_cache.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
kmem.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
kobj.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
kstat.h Fixes for procfs files backed by linked lists 2018-09-26 11:08:12 -07:00
list.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
Makefile.am Fixes for procfs files backed by linked lists 2018-09-26 11:08:12 -07:00
mode.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
mutex.h Update build system and packaging 2018-05-29 16:00:33 -07:00
param.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
proc.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
processor.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
procfs_list.h Fixes for procfs files backed by linked lists 2018-09-26 11:08:12 -07:00
random.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
rwlock.h Add rwsem_tryupgrade for 4.9.20-rt16 kernel 2018-07-30 09:22:30 -07:00
shrinker.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
sid.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
signal.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
stat.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
strings.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
sunddi.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
sysmacros.h Create /proc/sys/kernel/spl/gitrev with git hash 2018-10-08 21:57:02 -07:00
systeminfo.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
taskq.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
thread.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
time.h Define timestruc_t for Lustre compatibility 2018-10-12 11:13:34 -07:00
timer.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
tsd.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
types32.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
types.h Linux 4.18 compat: inode timespec -> timespec64 2018-06-19 21:51:18 -07:00
uio.h deadlock between mm_sem and tx assign in zfs_write() and page fault 2018-10-16 11:11:24 -07:00
user.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
vfs.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
vmem.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
vmsystm.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
vnode.h Linux 4.18 compat: inode timespec -> timespec64 2018-06-19 21:51:18 -07:00
wait.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
zmod.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
zone.h Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00