On Wed, Jul 17, 2019 at 01:41:12AM +0000, Aron Xu wrote: > Package: release.debian.org > Severity: normal > Tags: buster > User: release.debian....@packages.debian.org > Usertags: pu > > Dear release team, > > We would like to apply a single-line patch in addition to spl-linux/0.7.12-2 > which fixes a deadlock[1], please see the changes in debdiff. > > [1]https://github.com/zfsonlinux/spl/commit/cb4464f1549087794fdbe0f5ad2328618de2033e >
Please find debdiff in attachment.
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 2019-07-17 01:21:03.000000000 +0000 @@ -1,3 +1,10 @@ +spl-linux (0.7.12-2+deb10u1) buster; urgency=medium + + * debian/patches: + - fix deadlock between mm_sem and tx assign in zfs_write() and page fault + + -- Aron Xu <a...@debian.org> Wed, 17 Jul 2019 01:21:03 +0000 + spl-linux (0.7.12-2) unstable; urgency=medium [ Colin Ian King ] diff -Nru spl-linux-0.7.12/debian/patches/0006-deadlock-between-mm_sem-and-tx-assign-in-zfs_write-a.patch spl-linux-0.7.12/debian/patches/0006-deadlock-between-mm_sem-and-tx-assign-in-zfs_write-a.patch --- spl-linux-0.7.12/debian/patches/0006-deadlock-between-mm_sem-and-tx-assign-in-zfs_write-a.patch 1970-01-01 00:00:00.000000000 +0000 +++ spl-linux-0.7.12/debian/patches/0006-deadlock-between-mm_sem-and-tx-assign-in-zfs_write-a.patch 2019-07-17 01:16:28.000000000 +0000 @@ -0,0 +1,44 @@ +From cb4464f1549087794fdbe0f5ad2328618de2033e Mon Sep 17 00:00:00 2001 +From: Tony Hutter <hutt...@llnl.gov> +Date: Fri, 18 Jan 2019 10:05:58 -0800 +Subject: [PATCH 1/6] 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 <tux...@gmail.com> +Reviewed-by: Brian Behlendorf <behlendo...@llnl.gov> +Reviewed-by: Matthew Ahrens <mahr...@delphix.com> +Signed-off-by: Grady Wong <grad...@xtaotech.com> +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 764beb9..47715db 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; +-- +2.11.0 + 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 2019-07-17 01:18:28.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 +0006-deadlock-between-mm_sem-and-tx-assign-in-zfs_write-a.patch
signature.asc
Description: PGP signature