net: linkwatch: use system_unbound_wq
Subsystems (2)
PATCH 1/1 net: linkwatch: use system_unbound_wq
linkwatch_event() grabs possibly very contended RTNL mutex.
system_wq is not suitable for such work.
Inspired by many noisy syzbot reports.
3 locks held by kworker/0:7/5266:
#0: ffff888015480948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff888015480948 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc90003f6fd00 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] , at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312
#2: ffffffff8fa6f208 (rtnl_mutex){+.+.}-{3:3}, at: linkwatch_event+0xe/0x60 net/core/link_watch.c:276
--- net/core/link_watch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/core/link_watch.c +2 -2
@@ -148,9 +148,9 @@ static void linkwatch_schedule_work(int urgent)* override the existing timer. */ if (test_bit (LW_URGENT , &linkwatch_flags)) -mod_delayed_work (system_wq, &linkwatch_work,0 ); +mod_delayed_work (system_unbound_wq, &linkwatch_work,0 );else -schedule_delayed_work (&linkwatch_work, delay); +queue_delayed_work (system_unbound_wq, &linkwatch_work, delay); }
Signature · 1 line
2.46.0.rc2.264.g509ed76dc8-goog
From: Eric Dumazet <[email protected]>
Date: Mon, 5 Aug 2024 08:58:21 +0000
Quoted 13 lines
linkwatch_event()grabs possibly very contended RTNL mutex.
system_wqis not suitable for such work.Inspired by many noisy syzbot reports.
3 locks held by kworker/0:7/5266:
#0:ffff888015480948((wq_completion)events){+.+.}-{0:0}, at:process_one_workkernel/workqueue.c:3206[inline] #0:ffff888015480948((wq_completion)events){+.+.}-{0:0}, at:process_scheduled_works+0x90a/0x1830kernel/workqueue.c:3312#1:ffffc90003f6fd00((linkwatch_work).work){+.+.}-{0:0}, at:process_one_workkernel/workqueue.c:3207[inline] , at:process_scheduled_works+0x945/0x1830kernel/workqueue.c:3312
#2:ffffffff8fa6f208(rtnl_mutex){+.+.}-{3:3}, at:linkwatch_event+0xe/0x60net/core/link_watch.c:276
Quoted 3 lines
Reported-by syzbot <[email protected]>Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")Signed-off-by Eric Dumazet <[email protected]>
Quoted 22 lines
--- net/core/link_watch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)net/core/link_watch.c +2
-2@@ -148,9 +148,9 @@ static void linkwatch_schedule_work(int urgent)* override the existing timer. */ if (test_bit (LW_URGENT , &linkwatch_flags)) -mod_delayed_work (system_wq, &linkwatch_work,0 ); +mod_delayed_work (system_unbound_wq, &linkwatch_work,0 );else -schedule_delayed_work (&linkwatch_work, delay); +queue_delayed_work (system_unbound_wq, &linkwatch_work, delay); }Signature · 1 line
2.46.0.rc2.264.g509ed76dc8-goog
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 6 lines · On Mon, 5 Aug 2024 08:58:21 +0000 you wrote:
linkwatch_event()grabs possibly very contended RTNL mutex.
system_wqis not suitable for such work.Inspired by many noisy syzbot reports.
Quoted 8 lines
3 locks held by kworker/0:7/5266:
#0:ffff888015480948((wq_completion)events){+.+.}-{0:0}, at:process_one_workkernel/workqueue.c:3206[inline] #0:ffff888015480948((wq_completion)events){+.+.}-{0:0}, at:process_scheduled_works+0x90a/0x1830kernel/workqueue.c:3312#1:ffffc90003f6fd00((linkwatch_work).work){+.+.}-{0:0}, at:process_one_workkernel/workqueue.c:3207[inline] , at:process_scheduled_works+0x945/0x1830kernel/workqueue.c:3312
#2:ffffffff8fa6f208(rtnl_mutex){+.+.}-{3:3}, at:linkwatch_event+0xe/0x60net/core/link_watch.c:276[...]
Here is the summary with links:
- [net] net: linkwatch: use system_unbound_wq
https://git.kernel.org/netdev/net/c/3e7917c0cdad
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html