syzbot


possible deadlock in hsr_dev_destroy

Status: upstream: reported C repro on 2020/02/27 20:23
Reported-by: syzbot+e5f5b40aae74a763e22f@syzkaller.appspotmail.com
First crash: 1712d, last: 610d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 possible deadlock in hsr_dev_destroy C error 319 677d 1713d 0/1 upstream: reported C repro on 2020/02/27 05:28

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
netlink: 24 bytes leftover after parsing attributes in process `syz-executor195'.
============================================
WARNING: possible recursive locking detected
4.19.211-syzkaller #0 Not tainted
--------------------------------------------
syz-executor195/8092 is trying to acquire lock:
000000008827fbb0 (rtnl_mutex){+.+.}, at: hsr_dev_destroy+0x1b/0xb0 net/hsr/hsr_device.c:373

but task is already holding lock:
000000008827fbb0 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline]
000000008827fbb0 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x3fe/0xb80 net/core/rtnetlink.c:4779

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-executor195/8092:
 #0: 000000008827fbb0 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline]
 #0: 000000008827fbb0 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x3fe/0xb80 net/core/rtnetlink.c:4779

stack backtrace:
CPU: 0 PID: 8092 Comm: syz-executor195 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 print_deadlock_bug kernel/locking/lockdep.c:1764 [inline]
 check_deadlock kernel/locking/lockdep.c:1808 [inline]
 validate_chain kernel/locking/lockdep.c:2404 [inline]
 __lock_acquire.cold+0x121/0x57e kernel/locking/lockdep.c:3416
 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908
 __mutex_lock_common kernel/locking/mutex.c:937 [inline]
 __mutex_lock+0xd7/0x1190 kernel/locking/mutex.c:1078
 hsr_dev_destroy+0x1b/0xb0 net/hsr/hsr_device.c:373
 register_netdevice+0x901/0x10f0 net/core/dev.c:8791
 hsr_dev_finalize+0x4f5/0x770 net/hsr/hsr_device.c:491
 hsr_newlink+0x27d/0x3e0 net/hsr/hsr_netlink.c:78
 rtnl_newlink+0x1030/0x15c0 net/core/rtnetlink.c:3141
 rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4782
 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463
 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline]
 netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351
 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917
 sock_sendmsg_nosec net/socket.c:651 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:661
 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227
 __sys_sendmsg net/socket.c:2265 [inline]
 __do_sys_sendmsg net/socket.c:2274 [inline]
 __se_sys_sendmsg net/socket.c:2272 [inline]
 __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f9b1ba70869
Code: 28 c3 e8 4a 15 00 00 66 2e 0f 1f 84 00 00 00 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff7b20a388 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fff7b20a398 RCX: 00007f9b1ba70869
RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000004
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff7b20a3a0
R13: 00007fff7b20a3c0 R14: 0000000000000000 R15: 0000000000000000

Crashes (506):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/04 21:10 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/09/22 12:00 linux-4.19.y 3f8a27f9e27b 60af5050 .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/08/26 21:03 linux-4.19.y 3f8a27f9e27b e5a303f1 .config console log report syz C ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/05/12 00:41 linux-4.19.y 3f8a27f9e27b beb0b407 .config console log report syz C ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2020/02/29 11:52 linux-4.19.y a083db76118d c88c7b75 .config console log report syz C ci2-linux-4-19
2023/03/05 09:13 linux-4.19.y 3f8a27f9e27b f8902b57 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2023/02/26 05:18 linux-4.19.y 3f8a27f9e27b ee50e71c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2023/02/18 14:04 linux-4.19.y 3f8a27f9e27b d02e9a70 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2023/02/17 05:21 linux-4.19.y 3f8a27f9e27b 851bc19a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2023/02/04 01:55 linux-4.19.y 3f8a27f9e27b 1b2f701a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2023/01/30 21:59 linux-4.19.y 3f8a27f9e27b b68fb8d6 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2023/01/25 22:46 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2023/01/25 03:20 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2023/01/16 10:44 linux-4.19.y 3f8a27f9e27b a63719e7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2023/01/11 06:08 linux-4.19.y 3f8a27f9e27b 48bc529a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2023/01/10 03:20 linux-4.19.y 3f8a27f9e27b 48bc529a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2023/01/06 03:54 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2023/01/04 20:45 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/12/28 14:51 linux-4.19.y 3f8a27f9e27b 44712fbc .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/12/28 05:28 linux-4.19.y 3f8a27f9e27b 44712fbc .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/12/26 04:16 linux-4.19.y 3f8a27f9e27b 9da18ae8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/12/20 14:41 linux-4.19.y 3f8a27f9e27b c52b2efb .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/12/13 03:28 linux-4.19.y 3f8a27f9e27b 67be1ae7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/12/09 03:10 linux-4.19.y 3f8a27f9e27b 1034e5fa .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/12/09 02:05 linux-4.19.y 3f8a27f9e27b 1034e5fa .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/11/27 23:30 linux-4.19.y 3f8a27f9e27b f4470a7b .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/11/26 07:39 linux-4.19.y 3f8a27f9e27b f4470a7b .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/11/24 03:20 linux-4.19.y 3f8a27f9e27b 52fdf57a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/11/22 20:30 linux-4.19.y 3f8a27f9e27b 9da37ae8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/11/18 18:35 linux-4.19.y 3f8a27f9e27b 5bb70014 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/11/17 08:42 linux-4.19.y 3f8a27f9e27b 3a127a31 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/11/14 18:24 linux-4.19.y 3f8a27f9e27b 943f4cb8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/11/11 07:55 linux-4.19.y 3f8a27f9e27b f42ee5d8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/11/09 10:36 linux-4.19.y 3f8a27f9e27b 5fa28208 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/11/08 07:41 linux-4.19.y 3f8a27f9e27b 6feb842b .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/11/05 13:29 linux-4.19.y 3f8a27f9e27b 6d752409 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/11/03 16:46 linux-4.19.y 3f8a27f9e27b 7a2ebf95 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/11/02 14:30 linux-4.19.y 3f8a27f9e27b 08977f5d .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/11/01 14:19 linux-4.19.y 3f8a27f9e27b a1d8560a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/11/01 08:23 linux-4.19.y 3f8a27f9e27b a1d8560a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/10/29 13:31 linux-4.19.y 3f8a27f9e27b 899d812a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/10/29 09:52 linux-4.19.y 3f8a27f9e27b 899d812a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/10/28 15:09 linux-4.19.y 3f8a27f9e27b 8168b69e .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/10/25 19:29 linux-4.19.y 3f8a27f9e27b 45645420 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/10/22 13:39 linux-4.19.y 3f8a27f9e27b c0b80a55 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/10/21 22:20 linux-4.19.y 3f8a27f9e27b 63e790dd .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/10/19 06:02 linux-4.19.y 3f8a27f9e27b b31320fc .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/10/18 09:25 linux-4.19.y 3f8a27f9e27b 94744d21 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/10/15 22:56 linux-4.19.y 3f8a27f9e27b 67cb024c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/10/15 06:55 linux-4.19.y 3f8a27f9e27b 67cb024c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/10/14 12:49 linux-4.19.y 3f8a27f9e27b 4954e4b2 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2022/10/13 03:50 linux-4.19.y 3f8a27f9e27b 3f6b40a1 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in hsr_dev_destroy
2021/01/16 04:38 linux-4.19.y 675cc038067f 65a7a854 .config console log report info ci2-linux-4-19
2020/02/27 20:22 linux-4.19.y f25804f38984 40bcfdd5 .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.