All of lore.kernel.org
 help / color / mirror / Atom feed
From: chenguanyou <chenguanyou9338@gmail.com>
To: miklos@szeredi.hu
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	chenguanyou <chenguanyou@xiaomi.com>
Subject: [PATCH] [fuse] alloc_page nofs avoid deadlock
Date: Thu,  3 Jun 2021 20:52:42 +0800	[thread overview]
Message-ID: <20210603125242.31699-1-chenguanyou@xiaomi.com> (raw)

ABA deadlock

PID: 17172 TASK: ffffffc0c162c000 CPU: 6 COMMAND: "Thread-21"
0 [ffffff802d16b400] __switch_to at ffffff8008086a4c
1 [ffffff802d16b470] __schedule at ffffff80091ffe58
2 [ffffff802d16b4d0] schedule at ffffff8009200348
3 [ffffff802d16b4f0] bit_wait at ffffff8009201098
4 [ffffff802d16b510] __wait_on_bit at ffffff8009200a34
5 [ffffff802d16b5b0] inode_wait_for_writeback at ffffff800830e1e8
6 [ffffff802d16b5e0] evict at ffffff80082fb15c
7 [ffffff802d16b620] iput at ffffff80082f9270
8 [ffffff802d16b680] dentry_unlink_inode at ffffff80082f4c90
9 [ffffff802d16b6a0] __dentry_kill at ffffff80082f1710
10 [ffffff802d16b6d0] shrink_dentry_list at ffffff80082f1c34
11 [ffffff802d16b750] prune_dcache_sb at ffffff80082f18a8
12 [ffffff802d16b770] super_cache_scan at ffffff80082d55ac
13 [ffffff802d16b860] shrink_slab at ffffff8008266170
14 [ffffff802d16b900] shrink_node at ffffff800826b420
15 [ffffff802d16b980] do_try_to_free_pages at ffffff8008268460
16 [ffffff802d16ba60] try_to_free_pages at ffffff80082680d0
17 [ffffff802d16bbe0] __alloc_pages_nodemask at ffffff8008256514
18 [ffffff802d16bc60] fuse_copy_fill at ffffff8008438268
19 [ffffff802d16bd00] fuse_dev_do_read at ffffff8008437654
20 [ffffff802d16bdc0] fuse_dev_splice_read at ffffff8008436f40
21 [ffffff802d16be60] sys_splice at ffffff8008315d18
22 [ffffff802d16bff0] __sys_trace at ffffff8008084014

PID: 9652 TASK: ffffffc0c9ce0000 CPU: 4 COMMAND: "kworker/u16:8"
0 [ffffff802e793650] __switch_to at ffffff8008086a4c
1 [ffffff802e7936c0] __schedule at ffffff80091ffe58
2 [ffffff802e793720] schedule at ffffff8009200348
3 [ffffff802e793770] __fuse_request_send at ffffff8008435760
4 [ffffff802e7937b0] fuse_simple_request at ffffff8008435b14
5 [ffffff802e793930] fuse_flush_times at ffffff800843a7a0
6 [ffffff802e793950] fuse_write_inode at ffffff800843e4dc
7 [ffffff802e793980] __writeback_single_inode at ffffff8008312740
8 [ffffff802e793aa0] writeback_sb_inodes at ffffff80083117e4
9 [ffffff802e793b00] __writeback_inodes_wb at ffffff8008311d98
10 [ffffff802e793c00] wb_writeback at ffffff8008310cfc
11 [ffffff802e793d00] wb_workfn at ffffff800830e4a8
12 [ffffff802e793d90] process_one_work at ffffff80080e4fac
13 [ffffff802e793e00] worker_thread at ffffff80080e5670
14 [ffffff802e793e60] kthread at ffffff80080eb650

Signed-off-by: chenguanyou <chenguanyou@xiaomi.com>
---
 fs/fuse/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index c0fee830a34e..d36125ff0405 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -721,7 +721,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs)
 			if (cs->nr_segs >= cs->pipe->max_usage)
 				return -EIO;
 
-			page = alloc_page(GFP_HIGHUSER);
+			page = alloc_page(GFP_NOFS | __GFP_HIGHMEM);
 			if (!page)
 				return -ENOMEM;
 
-- 
2.17.1


             reply	other threads:[~2021-06-03 12:54 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03 12:52 chenguanyou [this message]
2021-06-08 14:54 ` Re:[PATCH] fuse: alloc_page nofs avoid deadlock chenguanyou
2021-06-08 15:30 ` [PATCH] [fuse] " Miklos Szeredi
2021-06-11 12:14   ` Re:[PATCH] fuse: " chenguanyou
2021-07-13  2:42   ` [PATCH] [fuse] " Ed Tsai
2021-08-18  9:24     ` Miklos Szeredi
2021-09-24  3:52       ` Ed Tsai
2021-09-24  7:52         ` Miklos Szeredi
2021-09-28 15:25           ` Miklos Szeredi
2021-09-29  3:31             ` Re:[PATCH] fuse: " chenguanyou
2021-12-14  9:25             ` [PATCH] [fuse] " Ed Tsai
2021-12-14  9:38               ` Greg Kroah-Hartman
2021-12-15  8:22                 ` Ed Tsai
2021-12-15 13:52                   ` Greg Kroah-Hartman
     [not found]             ` <SI2PR03MB5545E0B76E54013678B9FEEC8BA99@SI2PR03MB5545.apcprd03.prod.outlook.com>
2022-06-10  7:48               ` Ed Tsai
2022-06-13  8:45                 ` Miklos Szeredi
2022-06-13  9:29                   ` Ed Tsai
2022-07-05  8:53                     ` [PATCH 1/1] fuse: add fuse_d_iput to postponed the iput Ed Tsai
2022-07-18 13:57                       ` Miklos Szeredi
2022-07-11  7:49                     ` [PATCH] [fuse] alloc_page nofs avoid deadlock Miklos Szeredi
2022-07-12  1:16                       ` Ed Tsai
  -- strict thread matches above, loose matches on Subject: below --
2021-06-03 12:41 chenguanyou
2021-06-03 12:56 ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210603125242.31699-1-chenguanyou@xiaomi.com \
    --to=chenguanyou9338@gmail.com \
    --cc=chenguanyou@xiaomi.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.