mirror_zfs/module/zcommon
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
..
Makefile.in OpenZFS 7431 - ZFS Channel Programs 2018-02-08 15:28:18 -08:00
zfeature_common.c Fix in-kernel sysfs entries 2018-09-06 21:44:52 -07:00
zfs_comutil.c OpenZFS 9337 - zfs get all is slow due to uncached metadata 2018-07-12 10:49:27 -07:00
zfs_deleg.c Update build system and packaging 2018-05-29 16:00:33 -07:00
zfs_fletcher_aarch64_neon.c Update build system and packaging 2018-05-29 16:00:33 -07:00
zfs_fletcher_avx512.c Update build system and packaging 2018-05-29 16:00:33 -07:00
zfs_fletcher_intel.c Update build system and packaging 2018-05-29 16:00:33 -07:00
zfs_fletcher_sse.c Update build system and packaging 2018-05-29 16:00:33 -07:00
zfs_fletcher_superscalar4.c Update build system and packaging 2018-05-29 16:00:33 -07:00
zfs_fletcher_superscalar.c Update build system and packaging 2018-05-29 16:00:33 -07:00
zfs_fletcher.c Update build system and packaging 2018-05-29 16:00:33 -07:00
zfs_namecheck.c OpenZFS 9330 - stack overflow when creating a deeply nested dataset 2018-07-09 13:02:50 -07:00
zfs_prop.c Pool allocation classes 2018-09-05 18:33:36 -07:00
zfs_uio.c deadlock between mm_sem and tx assign in zfs_write() and page fault 2018-10-16 11:11:24 -07:00
zpool_prop.c Introduce read/write kstats per dataset 2018-08-20 09:52:37 -07:00
zprop_common.c Fix in-kernel sysfs entries 2018-09-06 21:44:52 -07:00