syzbot


possible deadlock in hsr_dev_destroy

Status: upstream: reported C repro on 2020/02/27 05:28
Reported-by: syzbot+9113e147c58e1161a68e@syzkaller.appspotmail.com
First crash: 1716d, last: 681d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 possible deadlock in hsr_dev_destroy C 506 614d 1716d 0/1 upstream: reported C repro on 2020/02/27 20:23
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2022/04/04 10:33 16m bisect fix linux-4.14.y error job log
2021/11/29 12:04 27m bisect fix linux-4.14.y OK (0) job log log
2021/10/30 11:36 27m bisect fix linux-4.14.y OK (0) job log log
2021/09/30 10:01 28m bisect fix linux-4.14.y OK (0) job log log
2021/07/29 08:43 27m bisect fix linux-4.14.y OK (0) job log log
2021/06/12 19:35 27m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
IPv6: ADDRCONF(NETDEV_CHANGE): macvtap0: link becomes ready
batman_adv: batadv0: Interface activated: batadv_slave_1
IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
============================================
WARNING: possible recursive locking detected
4.14.294-syzkaller #0 Not tainted
--------------------------------------------
syz-executor110/7978 is trying to acquire lock:
 (rtnl_mutex){+.+.}, at: [<ffffffff86fb8c7b>] hsr_dev_destroy+0x1b/0xb0 net/hsr/hsr_device.c:373

but task is already holding lock:
 (rtnl_mutex){+.+.}, at: [<ffffffff85c85a4d>] rtnl_lock net/core/rtnetlink.c:72 [inline]
 (rtnl_mutex){+.+.}, at: [<ffffffff85c85a4d>] rtnetlink_rcv_msg+0x31d/0xb10 net/core/rtnetlink.c:4317

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-executor110/7978:
 #0:  (rtnl_mutex){+.+.}, at: [<ffffffff85c85a4d>] rtnl_lock net/core/rtnetlink.c:72 [inline]
 #0:  (rtnl_mutex){+.+.}, at: [<ffffffff85c85a4d>] rtnetlink_rcv_msg+0x31d/0xb10 net/core/rtnetlink.c:4317

stack backtrace:
CPU: 0 PID: 7978 Comm: syz-executor110 Not tainted 4.14.294-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2022
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_deadlock_bug kernel/locking/lockdep.c:1800 [inline]
 check_deadlock kernel/locking/lockdep.c:1847 [inline]
 validate_chain kernel/locking/lockdep.c:2448 [inline]
 __lock_acquire.cold+0x180/0x97c kernel/locking/lockdep.c:3491
 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998
 __mutex_lock_common kernel/locking/mutex.c:756 [inline]
 __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893
 hsr_dev_destroy+0x1b/0xb0 net/hsr/hsr_device.c:373
 register_netdevice+0x83c/0xe50 net/core/dev.c:7729
 hsr_dev_finalize+0x57b/0x800 net/hsr/hsr_device.c:492
 hsr_newlink+0x259/0x3a0 net/hsr/hsr_netlink.c:78
 rtnl_newlink+0xf7c/0x1830 net/core/rtnetlink.c:2730
 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4322
 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2454
 netlink_unicast_kernel net/netlink/af_netlink.c:1296 [inline]
 netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1322
 netlink_sendmsg+0x648/0xbc0 net/netlink/af_netlink.c:1893
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg+0xb5/0x100 net/socket.c:656
 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062
 __sys_sendmsg+0xa3/0x120 net/socket.c:2096
 SYSC_sendmsg net/socket.c:2107 [inline]
 SyS_sendmsg+0x27/0x40 net/socket.c:2103
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7fee6c3f99a9
RSP: 002b:00007ffee5330978 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007ffee5330988 RCX: 00007fee6c3f99a9
RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000005
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffee5330990
R13: 00007ffee53309b0 R14: 0000000000000000 R15: 0000000000000000

Crashes (319):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/09/22 11:31 linux-4.14.y 4edbf74132a4 60af5050 .config console log report syz C [disk image] [vmlinux] ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/06/01 11:55 linux-4.14.y 501eec4f9e13 3666edfe .config console log report syz C ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2020/02/27 05:55 linux-4.14.y 98db2bf27b9e 251aabb7 .config console log report syz C ci2-linux-4-14
2022/12/28 20:14 linux-4.14.y c4215ee4771b 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/12/28 18:07 linux-4.14.y c4215ee4771b 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/12/15 23:51 linux-4.14.y c4215ee4771b 6f9c033e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/12/13 03:45 linux-4.14.y 65afe34ac33d 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/09/22 11:07 linux-4.14.y 4edbf74132a4 60af5050 .config console log report info [disk image] [vmlinux] ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/09/01 09:10 linux-4.14.y e548869f356f b01ec571 .config console log report info [disk image] [vmlinux] ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/08/17 01:32 linux-4.14.y b641242202ed 9e4b39c2 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/07/15 00:37 linux-4.14.y 424a46ea058e 5d921b08 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/07/09 09:33 linux-4.14.y 1048779a1d7d b5765a15 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/06/22 15:47 linux-4.14.y 84bae26850e3 0fc5c330 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/06/22 13:24 linux-4.14.y 84bae26850e3 0fc5c330 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/06/11 22:11 linux-4.14.y b8f3be299d51 0d5abf15 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/06/08 03:18 linux-4.14.y b8f3be299d51 b2706118 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/06/02 06:31 linux-4.14.y 501eec4f9e13 b4bc6a3d .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/06/01 11:39 linux-4.14.y 501eec4f9e13 3666edfe .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/03/05 10:22 linux-4.14.y e853993d29aa 45a13a73 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/03/03 16:13 linux-4.14.y e853993d29aa 45a13a73 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/02/27 07:20 linux-4.14.y fa33f9094f36 45a13a73 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/02/24 23:03 linux-4.14.y fa33f9094f36 b28851a4 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/02/17 04:23 linux-4.14.y a35d65bedfbc 50221962 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/02/14 19:23 linux-4.14.y 8034e99d1a01 8b9ca619 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/02/04 00:42 linux-4.14.y b86ee2b7ae42 30646bfe .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/01/30 06:37 linux-4.14.y b86ee2b7ae42 495e00c5 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/01/28 13:16 linux-4.14.y bbb957e1bd4a 495e00c5 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/01/26 00:31 linux-4.14.y 4ba8e26127c3 2cbffd88 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/01/19 14:28 linux-4.14.y 4ba8e26127c3 0620189b .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/01/14 03:31 linux-4.14.y 4ba8e26127c3 b8d780ab .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/01/13 22:41 linux-4.14.y 4ba8e26127c3 b8d780ab .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/01/12 15:09 linux-4.14.y 4ba8e26127c3 44d1319a .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2022/01/01 10:02 linux-4.14.y a6ca7c65b137 e1768e9c .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/12/20 01:52 linux-4.14.y 9dfbac0e6b86 44068e19 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/12/19 06:38 linux-4.14.y 9dfbac0e6b86 44068e19 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/12/11 17:35 linux-4.14.y c01d4d1b885d 49ca1f59 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/12/06 15:33 linux-4.14.y 66722c42ec91 579a8754 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/12/04 21:09 linux-4.14.y 66722c42ec91 a617004c .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/12/04 14:59 linux-4.14.y 66722c42ec91 a617004c .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/12/04 09:08 linux-4.14.y 66722c42ec91 a617004c .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/08/31 10:00 linux-4.14.y 35c4ba160ab6 8f58a0ef .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/08/19 07:24 linux-4.14.y 162b95d01320 a2fe1cb5 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/06/29 08:43 linux-4.14.y cfb41ef9deb1 9d2ab5df .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/05/13 19:27 linux-4.14.y 7d7d1c0ab3eb ecb594cb .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/05/11 08:47 linux-4.14.y 7d7d1c0ab3eb ca873091 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/04/29 21:02 linux-4.14.y 7d7d1c0ab3eb 77e2b668 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/04/28 15:45 linux-4.14.y 7d7d1c0ab3eb 77e2b668 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/04/27 23:26 linux-4.14.y cf256fbcbe34 805b5003 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/04/27 04:34 linux-4.14.y cf256fbcbe34 8ee2dea6 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/04/22 20:10 linux-4.14.y cf256fbcbe34 33c28d03 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/04/21 03:36 linux-4.14.y cf256fbcbe34 c0ced557 .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/04/18 23:16 linux-4.14.y cf256fbcbe34 7e2b734b .config console log report info ci2-linux-4-14 possible deadlock in hsr_dev_destroy
2021/01/17 02:31 linux-4.14.y f79dc86058bc 65a7a854 .config console log report info ci2-linux-4-14
2020/02/27 05:27 linux-4.14.y 98db2bf27b9e 251aabb7 .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.