Version in base suite: 0.7.12-2 Base version: spl-linux_0.7.12-2 Target version: spl-linux_0.7.12-2+deb10u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/s/spl-linux/spl-linux_0.7.12-2.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/s/spl-linux/spl-linux_0.7.12-2+deb10u1.dsc changelog | 6 ++ patches/cb4464f1549087794fdbe0f5ad2328618de2033e.patch | 41 +++++++++++++++++ patches/series | 1 3 files changed, 48 insertions(+) diff -Nru spl-linux-0.7.12/debian/changelog spl-linux-0.7.12/debian/changelog --- spl-linux-0.7.12/debian/changelog 2019-02-19 04:40:38.000000000 +0000 +++ spl-linux-0.7.12/debian/changelog 2020-04-16 10:25:09.000000000 +0000 @@ -1,3 +1,9 @@ +spl-linux (0.7.12-2+deb10u1) buster; urgency=medium + + * Cherry-pick upstream commit cb4464f to fix deadlock. (#932251) + + -- Mo Zhou Thu, 16 Apr 2020 18:25:09 +0800 + spl-linux (0.7.12-2) unstable; urgency=medium [ Colin Ian King ] diff -Nru spl-linux-0.7.12/debian/patches/cb4464f1549087794fdbe0f5ad2328618de2033e.patch spl-linux-0.7.12/debian/patches/cb4464f1549087794fdbe0f5ad2328618de2033e.patch --- spl-linux-0.7.12/debian/patches/cb4464f1549087794fdbe0f5ad2328618de2033e.patch 1970-01-01 00:00:00.000000000 +0000 +++ spl-linux-0.7.12/debian/patches/cb4464f1549087794fdbe0f5ad2328618de2033e.patch 2020-04-16 10:25:09.000000000 +0000 @@ -0,0 +1,41 @@ +From cb4464f1549087794fdbe0f5ad2328618de2033e Mon Sep 17 00:00:00 2001 +From: Tony Hutter +Date: Fri, 18 Jan 2019 10:05:58 -0800 +Subject: [PATCH] deadlock between mm_sem and tx assign in zfs_write() and page + fault + +(This is the ported SPL portion of this patch) + +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 +Reviewed-by: Brian Behlendorf +Reviewed-by: Matthew Ahrens +Signed-off-by: Grady Wong +Closes #7939 +--- + include/sys/uio.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/sys/uio.h b/include/sys/uio.h +index 764beb9f..47715db4 100644 +--- a/include/sys/uio.h ++++ b/include/sys/uio.h +@@ -53,6 +53,7 @@ typedef struct uio { + int uio_iovcnt; + offset_t uio_loffset; + uio_seg_t uio_segflg; ++ boolean_t uio_fault_disable; + uint16_t uio_fmode; + uint16_t uio_extflg; + offset_t uio_limit; diff -Nru spl-linux-0.7.12/debian/patches/series spl-linux-0.7.12/debian/patches/series --- spl-linux-0.7.12/debian/patches/series 2019-01-18 14:29:38.000000000 +0000 +++ spl-linux-0.7.12/debian/patches/series 2020-04-16 10:25:09.000000000 +0000 @@ -3,3 +3,4 @@ 0003-Add-check-for-ktime_get_ts64-for-V5.0-ke.patch 0004-Add-check-for-timespec64-sub.patch 0005-Use-64-bit-timespec-fixes.patch +cb4464f1549087794fdbe0f5ad2328618de2033e.patch