diff options
author | Salvatore Bonaccorso <carnil@debian.org> | 2021-03-19 16:52:38 +0100 |
---|---|---|
committer | Salvatore Bonaccorso <carnil@debian.org> | 2021-03-19 16:53:07 +0100 |
commit | 01ffd8e08fd317a977585d5ea6c38f6250bf350f (patch) | |
tree | 00ef3290adeb5eac743ef6cb8c705dd3768c7dd9 | |
parent | 65e1218127075c33c626e454807a0c64018cece9 (diff) | |
download | linux-debian-01ffd8e08fd317a977585d5ea6c38f6250bf350f.tar.gz |
fuse: fix live lock in fuse_iget()
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | debian/patches/bugfix/all/fuse-fix-live-lock-in-fuse_iget.patch | 52 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 54 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 532379434..053f8e782 100644 --- a/debian/changelog +++ b/debian/changelog @@ -888,6 +888,7 @@ linux (5.10.24-1) UNRELEASED; urgency=medium * [x86] crypto: aesni - Use TEST %reg,%reg instead of CMP $0,%reg * [x86] crypto: x86/aes-ni-xts - use direct calls to and 4-way stride * RDMA/srp: Fix support for unpopulated and unbalanced NUMA nodes + * fuse: fix live lock in fuse_iget() [ Wookey ] * [arm64] drivers/perf: Enable ARM_CMN as module (Closes: #981186) diff --git a/debian/patches/bugfix/all/fuse-fix-live-lock-in-fuse_iget.patch b/debian/patches/bugfix/all/fuse-fix-live-lock-in-fuse_iget.patch new file mode 100644 index 000000000..f5491e65b --- /dev/null +++ b/debian/patches/bugfix/all/fuse-fix-live-lock-in-fuse_iget.patch @@ -0,0 +1,52 @@ +From 775c5033a0d164622d9d10dd0f0a5531639ed3ed Mon Sep 17 00:00:00 2001 +From: Amir Goldstein <amir73il@gmail.com> +Date: Thu, 4 Mar 2021 11:09:12 +0200 +Subject: fuse: fix live lock in fuse_iget() + +From: Amir Goldstein <amir73il@gmail.com> + +commit 775c5033a0d164622d9d10dd0f0a5531639ed3ed upstream. + +Commit 5d069dbe8aaf ("fuse: fix bad inode") replaced make_bad_inode() +in fuse_iget() with a private implementation fuse_make_bad(). + +The private implementation fails to remove the bad inode from inode +cache, so the retry loop with iget5_locked() finds the same bad inode +and marks it bad forever. + +kmsg snip: + +[ ] rcu: INFO: rcu_sched self-detected stall on CPU +... +[ ] ? bit_wait_io+0x50/0x50 +[ ] ? fuse_init_file_inode+0x70/0x70 +[ ] ? find_inode.isra.32+0x60/0xb0 +[ ] ? fuse_init_file_inode+0x70/0x70 +[ ] ilookup5_nowait+0x65/0x90 +[ ] ? fuse_init_file_inode+0x70/0x70 +[ ] ilookup5.part.36+0x2e/0x80 +[ ] ? fuse_init_file_inode+0x70/0x70 +[ ] ? fuse_inode_eq+0x20/0x20 +[ ] iget5_locked+0x21/0x80 +[ ] ? fuse_inode_eq+0x20/0x20 +[ ] fuse_iget+0x96/0x1b0 + +Fixes: 5d069dbe8aaf ("fuse: fix bad inode") +Cc: stable@vger.kernel.org # 5.10+ +Signed-off-by: Amir Goldstein <amir73il@gmail.com> +Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + fs/fuse/fuse_i.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/fs/fuse/fuse_i.h ++++ b/fs/fuse/fuse_i.h +@@ -862,6 +862,7 @@ static inline u64 fuse_get_attr_version( + + static inline void fuse_make_bad(struct inode *inode) + { ++ remove_inode_hash(inode); + set_bit(FUSE_I_BAD, &get_fuse_inode(inode)->state); + } + diff --git a/debian/patches/series b/debian/patches/series index 1cbb9581b..21a750da2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -90,6 +90,7 @@ bugfix/all/partially-revert-usb-kconfig-using-select-for-usb_co.patch debian/makefile-do-not-check-for-libelf-when-building-oot-module.patch bugfix/all/partially-revert-net-socket-implement-64-bit-timestamps.patch bugfix/all/rdma-srp-fix-support-for-unpopulated-and-unbalanced-numa-nodes.patch +bugfix/all/fuse-fix-live-lock-in-fuse_iget.patch # Miscellaneous features |