syzbot


possible deadlock in strp_work

Status: upstream: reported C repro on 2020/03/06 14:18
Reported-by: syzbot+2d18205a9696fdf247d6@syzkaller.appspotmail.com
First crash: 1565d, last: 648d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in strp_work net C error 4 666d 667d 22/27 fixed on 2023/02/24 13:50
Fix bisection attempts (8)
Created Duration User Patch Repo Result
2022/10/13 02:23 0m bisect fix linux-4.14.y error job log (0)
2021/11/30 09:31 22m bisect fix linux-4.14.y job log (0) log
2021/10/31 09:08 22m bisect fix linux-4.14.y job log (0) log
2021/10/01 07:27 26m bisect fix linux-4.14.y job log (0) log
2021/09/01 06:58 26m bisect fix linux-4.14.y job log (0) log
2021/08/02 06:34 23m bisect fix linux-4.14.y job log (0) log
2021/06/06 23:15 26m bisect fix linux-4.14.y job log (0) log
2020/12/19 17:44 22m bisect fix linux-4.14.y job log (0) log

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
4.14.289-syzkaller #0 Not tainted
------------------------------------------------------
kworker/u4:1/23 is trying to acquire lock:
 (sk_lock-AF_INET6){+.+.}, at: [<ffffffff8681e12e>] do_strp_work net/strparser/strparser.c:415 [inline]
 (sk_lock-AF_INET6){+.+.}, at: [<ffffffff8681e12e>] strp_work+0x3e/0x100 net/strparser/strparser.c:434

but task is already holding lock:
 ((&strp->work)){+.+.}, at: [<ffffffff81364ee6>] process_one_work+0x6e6/0x14a0 kernel/workqueue.c:2092

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 ((&strp->work)){+.+.}:
       flush_work+0xad/0x770 kernel/workqueue.c:2890
       __cancel_work_timer+0x321/0x460 kernel/workqueue.c:2965
       strp_done+0x53/0xd0 net/strparser/strparser.c:519
       kcm_attach net/kcm/kcmsock.c:1429 [inline]
       kcm_attach_ioctl net/kcm/kcmsock.c:1490 [inline]
       kcm_ioctl+0x828/0xfb0 net/kcm/kcmsock.c:1701
       sock_do_ioctl net/socket.c:974 [inline]
       sock_ioctl+0x2cc/0x4c0 net/socket.c:1071
       vfs_ioctl fs/ioctl.c:46 [inline]
       file_ioctl fs/ioctl.c:500 [inline]
       do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684
       SYSC_ioctl fs/ioctl.c:701 [inline]
       SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692
       do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
       entry_SYSCALL_64_after_hwframe+0x46/0xbb

-> #0 (sk_lock-AF_INET6){+.+.}:
       lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998
       lock_sock_nested+0xb7/0x100 net/core/sock.c:2813
       do_strp_work net/strparser/strparser.c:415 [inline]
       strp_work+0x3e/0x100 net/strparser/strparser.c:434
       process_one_work+0x793/0x14a0 kernel/workqueue.c:2117
       worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251
       kthread+0x30d/0x420 kernel/kthread.c:232
       ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock((&strp->work));
                               lock(sk_lock-AF_INET6);
                               lock((&strp->work));
  lock(sk_lock-AF_INET6);

 *** DEADLOCK ***

2 locks held by kworker/u4:1/23:
 #0:  ("%s""kstrp"){+.+.}, at: [<ffffffff81364eb0>] process_one_work+0x6b0/0x14a0 kernel/workqueue.c:2088
 #1:  ((&strp->work)){+.+.}, at: [<ffffffff81364ee6>] process_one_work+0x6e6/0x14a0 kernel/workqueue.c:2092

stack backtrace:
CPU: 1 PID: 23 Comm: kworker/u4:1 Not tainted 4.14.289-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
Workqueue: kstrp strp_work
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1258
 check_prev_add kernel/locking/lockdep.c:1905 [inline]
 check_prevs_add kernel/locking/lockdep.c:2022 [inline]
 validate_chain kernel/locking/lockdep.c:2464 [inline]
 __lock_acquire+0x2e0e/0x3f20 kernel/locking/lockdep.c:3491
 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998
 lock_sock_nested+0xb7/0x100 net/core/sock.c:2813
 do_strp_work net/strparser/strparser.c:415 [inline]
 strp_work+0x3e/0x100 net/strparser/strparser.c:434
 process_one_work+0x793/0x14a0 kernel/workqueue.c:2117


Crashes (214):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/07/26 15:37 linux-4.14.y 9c3bf9cf362f 279b89c2 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/26 15:19 linux-4.14.y 9c3bf9cf362f 279b89c2 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/25 20:36 linux-4.14.y 9c3bf9cf362f 664c519c .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/25 15:55 linux-4.14.y 9c3bf9cf362f 664c519c .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/24 20:49 linux-4.14.y 9c3bf9cf362f 22343af4 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/22 17:30 linux-4.14.y 9c3bf9cf362f 22343af4 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/22 02:05 linux-4.14.y 9c3bf9cf362f 5e6028b9 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/21 14:27 linux-4.14.y 424a46ea058e 6e67af9d .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/20 19:35 linux-4.14.y 424a46ea058e 88cb1383 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/19 14:29 linux-4.14.y 424a46ea058e 72a3cc0c .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/18 18:58 linux-4.14.y 424a46ea058e ff988920 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/16 06:36 linux-4.14.y 424a46ea058e 95cb00d1 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/16 06:20 linux-4.14.y 424a46ea058e 95cb00d1 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/15 22:36 linux-4.14.y 424a46ea058e 5d921b08 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/15 18:25 linux-4.14.y 424a46ea058e 5d921b08 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/15 18:07 linux-4.14.y 424a46ea058e 5d921b08 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/13 13:02 linux-4.14.y 424a46ea058e 5d921b08 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/12 21:22 linux-4.14.y 424a46ea058e d91dd8ea .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/12 21:01 linux-4.14.y 424a46ea058e d91dd8ea .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/12 04:58 linux-4.14.y 1048779a1d7d da3d6955 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/12 04:42 linux-4.14.y 1048779a1d7d da3d6955 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/11 16:13 linux-4.14.y 1048779a1d7d f3f217ff .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/11 06:07 linux-4.14.y 1048779a1d7d b5765a15 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/09 20:40 linux-4.14.y 1048779a1d7d b5765a15 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/09 02:44 linux-4.14.y 1048779a1d7d b5765a15 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/08 16:39 linux-4.14.y 1048779a1d7d 8442e655 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/07 22:35 linux-4.14.y 1048779a1d7d bff65f44 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/07 22:19 linux-4.14.y 1048779a1d7d bff65f44 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/06 22:54 linux-4.14.y ed2e96e11936 bff65f44 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/06 22:36 linux-4.14.y ed2e96e11936 bff65f44 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/05 09:47 linux-4.14.y ed2e96e11936 bff65f44 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/04 10:05 linux-4.14.y ed2e96e11936 1434eec0 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/01 18:59 linux-4.14.y f051383ef03b 1434eec0 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/07/01 08:36 linux-4.14.y f051383ef03b 1434eec0 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/06/30 19:07 linux-4.14.y f051383ef03b 1434eec0 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/06/25 06:58 linux-4.14.y 84bae26850e3 a371c43c .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/06/24 00:34 linux-4.14.y 84bae26850e3 912f5df7 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/06/19 18:13 linux-4.14.y 84bae26850e3 8f633d84 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/06/19 05:05 linux-4.14.y 84bae26850e3 8f633d84 .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2022/06/14 23:13 linux-4.14.y 1ccc597f801c 127d1faf .config console log report syz C ci2-linux-4-14 possible deadlock in strp_work
2020/11/19 17:38 linux-4.14.y 8961076ed318 0767f13f .config console log report syz C ci2-linux-4-14
2022/09/09 13:55 linux-4.14.y 65640c873dcf 90058bdc .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/08/29 13:39 linux-4.14.y e548869f356f 94da0b6b .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/08/27 07:20 linux-4.14.y e548869f356f 07177916 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/08/27 02:35 linux-4.14.y e548869f356f 07177916 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/08/25 09:43 linux-4.14.y b641242202ed 514514f6 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/08/21 23:36 linux-4.14.y b641242202ed 26a13b38 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/08/17 03:14 linux-4.14.y b641242202ed 9e4b39c2 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/08/12 10:58 linux-4.14.y b641242202ed 402cd70d .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/08/11 11:58 linux-4.14.y b641242202ed 787ed7e0 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/08/10 12:03 linux-4.14.y b641242202ed aaa9eaa0 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/08/06 18:19 linux-4.14.y b641242202ed 88e3a122 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/08/05 23:28 linux-4.14.y b641242202ed e853abd9 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/08/04 06:00 linux-4.14.y b641242202ed 1c9013ac .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/07/27 10:29 linux-4.14.y 9c3bf9cf362f da9d0366 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/07/27 07:58 linux-4.14.y 9c3bf9cf362f ae971e66 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/07/24 18:45 linux-4.14.y 9c3bf9cf362f 22343af4 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/07/20 15:44 linux-4.14.y 424a46ea058e 88cb1383 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/07/16 08:17 linux-4.14.y 424a46ea058e 95cb00d1 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/07/13 07:54 linux-4.14.y 424a46ea058e 5d921b08 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/07/08 12:15 linux-4.14.y 1048779a1d7d 8442e655 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/07/06 15:09 linux-4.14.y ed2e96e11936 bff65f44 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/06/25 03:20 linux-4.14.y 84bae26850e3 a371c43c .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/06/22 17:04 linux-4.14.y 84bae26850e3 912f5df7 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/06/16 05:37 linux-4.14.y 1ccc597f801c 1719ee24 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/06/04 09:09 linux-4.14.y 501eec4f9e13 c8857892 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/06/02 06:26 linux-4.14.y 501eec4f9e13 b4bc6a3d .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/05/26 07:54 linux-4.14.y 501eec4f9e13 3037caa9 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/05/20 16:01 linux-4.14.y dffb5c6ff09c bd37ad7e .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/05/18 16:11 linux-4.14.y dffb5c6ff09c 50c53f39 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/05/13 03:57 linux-4.14.y 569d1abf9402 9ad6612a .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/05/01 16:22 linux-4.14.y e3a56aaade89 2df221f6 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/05/01 13:45 linux-4.14.y e3a56aaade89 2df221f6 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/04/27 15:13 linux-4.14.y e3a56aaade89 1fa34c1b .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/04/26 21:43 linux-4.14.y 15a1c6b6f516 1fa34c1b .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/04/26 09:08 linux-4.14.y 15a1c6b6f516 1fa34c1b .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/04/25 18:00 linux-4.14.y 15a1c6b6f516 152baedd .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/04/20 18:26 linux-4.14.y 15a1c6b6f516 d4befee1 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/04/20 10:58 linux-4.14.y 15a1c6b6f516 7d7bc738 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/04/16 01:53 linux-4.14.y 74766a973637 8bcc32a6 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/04/04 08:27 linux-4.14.y 74766a973637 79a2a8fc .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/04/02 02:49 linux-4.14.y af1af6ebca0e 79a2a8fc .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/03/29 02:45 linux-4.14.y af1af6ebca0e 6bdac766 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/03/28 13:04 linux-4.14.y af1af6ebca0e 89bc8608 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/03/24 11:04 linux-4.14.y 004bfaafc45c 89bc8608 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2022/03/24 10:01 linux-4.14.y 004bfaafc45c 89bc8608 .config console log report info ci2-linux-4-14 possible deadlock in strp_work
2021/01/17 12:45 linux-4.14.y f79dc86058bc 813be542 .config console log report info ci2-linux-4-14
2020/03/06 14:17 linux-4.14.y 78d697fc93f9 7fb694ef .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.