bisecting fixing commit since 3d40d7117e353b84627c1e8c5ed9ae0b1237ef5c building syzkaller on 438e1227121e9d4bbca7b12b6e1b715524d512c2 testing commit 3d40d7117e353b84627c1e8c5ed9ae0b1237ef5c with gcc (GCC) 8.1.0 kernel signature: 806f3d4458f19d7cd0e769bce60f38d1f95702d50e7636d38c701d15f93b4206 all runs: crashed: possible deadlock in rtnl_lock testing current HEAD 67957f12548c785d0e0b14fd104d2297f3a71835 testing commit 67957f12548c785d0e0b14fd104d2297f3a71835 with gcc (GCC) 8.1.0 kernel signature: 4ae27baa96e4932ca9ea431a51eb3223d0c9896389eb0f8feadfb2a74a0236ab all runs: crashed: possible deadlock in rtnl_lock revisions tested: 2, total time: 29m7.791499108s (build: 21m16.450648786s, test: 5m54.401760732s) the crash still happens on HEAD commit msg: Linux 4.19.144 crash: possible deadlock in rtnl_lock netlink: 20 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 20 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 20 bytes leftover after parsing attributes in process `syz-executor.3'. ============================================ WARNING: possible recursive locking detected 4.19.144-syzkaller #0 Not tainted -------------------------------------------- syz-executor.4/7672 is trying to acquire lock: 0000000088584c7c (rtnl_mutex){+.+.}, at: rtnl_lock+0x12/0x20 net/core/rtnetlink.c:77 but task is already holding lock: 0000000088584c7c (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline] 0000000088584c7c (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x301/0x8f0 net/core/rtnetlink.c:4775 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(rtnl_mutex); lock(rtnl_mutex); *** DEADLOCK *** May be due to missing lock nesting notation 1 lock held by syz-executor.4/7672: #0: 0000000088584c7c (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline] #0: 0000000088584c7c (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x301/0x8f0 net/core/rtnetlink.c:4775 stack backtrace: CPU: 0 PID: 7672 Comm: syz-executor.4 Not tainted 4.19.144-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x123/0x177 lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:1763 [inline] check_deadlock kernel/locking/lockdep.c:1807 [inline] validate_chain kernel/locking/lockdep.c:2403 [inline] __lock_acquire.cold.62+0x259/0x57a kernel/locking/lockdep.c:3415 lock_acquire+0x173/0x3d0 kernel/locking/lockdep.c:3907 __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0xf5/0x1210 kernel/locking/mutex.c:1072 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087 rtnl_lock+0x12/0x20 net/core/rtnetlink.c:77 hsr_dev_destroy+0x1a/0xb0 net/hsr/hsr_device.c:373 register_netdevice+0xa43/0xfb0 net/core/dev.c:8777 hsr_dev_finalize+0x4d2/0x720 net/hsr/hsr_device.c:491 hsr_newlink+0x22f/0x3c0 net/hsr/hsr_netlink.c:78 rtnl_newlink+0xc7d/0x1320 net/core/rtnetlink.c:3141 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:4778 netlink_rcv_skb+0x13e/0x3d0 net/netlink/af_netlink.c:2455 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4796 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x443/0x650 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x765/0xc40 net/netlink/af_netlink.c:1909 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:632 ___sys_sendmsg+0x647/0x950 net/socket.c:2115 __sys_sendmsg+0xd9/0x180 net/socket.c:2153 __do_sys_sendmsg net/socket.c:2162 [inline] __se_sys_sendmsg net/socket.c:2160 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2160 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45afc9 Code: 2d b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb b5 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f58b0682c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045afc9 RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 000000000075c070 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f58b06836d4 R13: 00000000004ca891 R14: 00000000004e3a38 R15: 00000000ffffffff