mirror_zfs/module/zcommon
ilbsmart 98bb45e27a 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
2019-02-22 09:47:34 -08:00
..
Makefile.in Add superscalar fletcher4 2016-11-04 10:53:03 -07:00
zfs_comutil.c Change checksum & IO delay ratelimit values 2018-03-14 16:10:38 -07:00
zfs_deleg.c OpenZFS 6931 - lib/libzfs: cleanup gcc warnings 2017-02-07 14:02:27 -08:00
zfs_fletcher_aarch64_neon.c Add superscalar fletcher4 2016-11-04 10:53:03 -07:00
zfs_fletcher_avx512.c Fletcher4: save/reload implementation context 2016-10-05 16:41:46 +02:00
zfs_fletcher_intel.c Fletcher4: save/reload implementation context 2016-10-05 16:41:46 +02:00
zfs_fletcher_sse.c codebase style improvements for OpenZFS 6459 port 2017-01-22 13:25:40 -08:00
zfs_fletcher_superscalar4.c Add superscalar fletcher4 2016-11-04 10:53:03 -07:00
zfs_fletcher_superscalar.c Add superscalar fletcher4 2016-11-04 10:53:03 -07:00
zfs_fletcher.c Use fletcher_4 routines natively with abd_iterate_func() 2017-02-01 09:34:22 -08:00
zfs_namecheck.c Fix buffer overflow in dsl_dataset_name() 2017-07-24 12:56:49 -07:00
zfs_prop.c Add port of FreeBSD 'volmode' property 2017-07-12 13:05:37 -07:00
zfs_uio.c deadlock between mm_sem and tx assign in zfs_write() and page fault 2019-02-22 09:47:34 -08:00
zpool_prop.c Multi-modifier protection (MMP) 2017-07-13 13:54:00 -04:00
zprop_common.c Change KM_PUSHPAGE -> KM_SLEEP 2015-01-16 14:41:26 -08:00