syzbot


possible deadlock in dev_mc_unsync

Status: fixed on 2020/08/18 22:40
Reported-by: syzbot+08e3d39f3eb8643216be@syzkaller.appspotmail.com
Fix commit: be74294ffa24 net: get rid of lockdep_set_class_and_subclass()
First crash: 775d, last: 758d

Cause bisection: failed (bisect log)

Fix bisection: fixed by (bisect log) :
commit be74294ffa24f5fbc0d6643842e3e095447e17a2
Author: Cong Wang <xiyou.wangcong@gmail.com>
Date: Fri Jun 26 18:24:22 2020 +0000

  net: get rid of lockdep_set_class_and_subclass()

Patch testing requests:
Created Duration User Patch Repo Result
2020/06/27 18:07 17m xiyou.wangcong@gmail.com https://github.com/congwang/linux.git net OK

Sample crash report:
============================================
WARNING: possible recursive locking detected
5.8.0-rc2-syzkaller #0 Not tainted
--------------------------------------------
syz-executor094/7550 is trying to acquire lock:
ffff8880a8f1e280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: netif_addr_lock_nested include/linux/netdevice.h:4243 [inline]
ffff8880a8f1e280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: dev_mc_unsync net/core/dev_addr_lists.c:915 [inline]
ffff8880a8f1e280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: dev_mc_unsync+0xf4/0x190 net/core/dev_addr_lists.c:909

but task is already holding lock:
ffff8880876f4280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:358 [inline]
ffff8880876f4280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: netif_addr_lock_bh include/linux/netdevice.h:4248 [inline]
ffff8880876f4280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: dev_mc_unsync net/core/dev_addr_lists.c:914 [inline]
ffff8880876f4280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: dev_mc_unsync+0xb0/0x190 net/core/dev_addr_lists.c:909

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&vlan_netdev_addr_lock_key/1);
  lock(&vlan_netdev_addr_lock_key/1);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

2 locks held by syz-executor094/7550:
 #0: ffffffff8a7b0228 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:72 [inline]
 #0: ffffffff8a7b0228 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x3f9/0xad0 net/core/rtnetlink.c:5457
 #1: ffff8880876f4280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:358 [inline]
 #1: ffff8880876f4280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: netif_addr_lock_bh include/linux/netdevice.h:4248 [inline]
 #1: ffff8880876f4280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: dev_mc_unsync net/core/dev_addr_lists.c:914 [inline]
 #1: ffff8880876f4280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: dev_mc_unsync+0xb0/0x190 net/core/dev_addr_lists.c:909

stack backtrace:
CPU: 0 PID: 7550 Comm: syz-executor094 Not tainted 5.8.0-rc2-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+0x18f/0x20d lib/dump_stack.c:118
 print_deadlock_bug kernel/locking/lockdep.c:2391 [inline]
 check_deadlock kernel/locking/lockdep.c:2432 [inline]
 validate_chain kernel/locking/lockdep.c:3202 [inline]
 __lock_acquire.cold+0x178/0x3f8 kernel/locking/lockdep.c:4380
 lock_acquire+0x1f1/0xad0 kernel/locking/lockdep.c:4959
 _raw_spin_lock_nested+0x30/0x40 kernel/locking/spinlock.c:361
 netif_addr_lock_nested include/linux/netdevice.h:4243 [inline]
 dev_mc_unsync net/core/dev_addr_lists.c:915 [inline]
 dev_mc_unsync+0xf4/0x190 net/core/dev_addr_lists.c:909
 vlan_dev_stop+0x51/0x350 net/8021q/vlan_dev.c:315
 __dev_close_many+0x1b3/0x2e0 net/core/dev.c:1599
 dev_close_many+0x238/0x650 net/core/dev.c:1624
 vlan_device_event+0x8ef/0x2010 net/8021q/vlan.c:450
 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83
 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2027
 call_netdevice_notifiers_extack net/core/dev.c:2039 [inline]
 call_netdevice_notifiers net/core/dev.c:2053 [inline]
 dev_close_many+0x30b/0x650 net/core/dev.c:1628
 rollback_registered_many+0x3af/0xf60 net/core/dev.c:8945
 unregister_netdevice_many.part.0+0x1a/0x2f0 net/core/dev.c:10113
 unregister_netdevice_many+0x36/0x50 net/core/dev.c:10112
 rtnl_delete_link net/core/rtnetlink.c:2953 [inline]
 rtnl_dellink+0x351/0xa70 net/core/rtnetlink.c:3005
 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5460
 netlink_rcv_skb+0x15a/0x430 net/netlink/af_netlink.c:2469
 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1329
 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1918
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:672
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2352
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2406
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2439
 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:359
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x4495a9
Code: Bad RIP value.
RSP: 002b:00007f5a08ffddb8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000006dec68 RCX: 00000000004495a9
RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000000000003
RBP: 00000000006dec60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dec6c
R13: 00007ffef4bb9e0f R14: 00007f5a08ffe9c0 R15: 00000000006dec6c

Crashes (78):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-net-this-kasan-gce 2020/06/27 13:19 net 4a21185cda0f ffec44b5 .config log report syz C
ci-upstream-kasan-gce 2020/07/02 09:16 upstream cd77006e01b3 bed10395 .config log report
ci-upstream-kasan-gce-root 2020/07/01 05:49 upstream 9ebcfadb0610 917afeaa .config log report
ci-upstream-net-this-kasan-gce 2020/06/30 09:28 net 0574e2000fc3 a2cdad9d .config log report
ci-upstream-net-this-kasan-gce 2020/06/30 06:34 net 0574e2000fc3 a2cdad9d .config log report
ci-upstream-net-this-kasan-gce 2020/06/29 21:23 net 0574e2000fc3 a2cdad9d .config log report
ci-upstream-net-this-kasan-gce 2020/06/29 18:02 net 0574e2000fc3 a2cdad9d .config log report
ci-upstream-net-this-kasan-gce 2020/06/29 16:56 net 0574e2000fc3 a2cdad9d .config log report
ci-upstream-net-this-kasan-gce 2020/06/28 22:56 net 0574e2000fc3 a2cdad9d .config log report
ci-upstream-net-this-kasan-gce 2020/06/27 15:26 net 4a21185cda0f ffec44b5 .config log report
ci-upstream-net-this-kasan-gce 2020/06/27 12:15 net 4a21185cda0f ffec44b5 .config log report
ci-upstream-net-this-kasan-gce 2020/06/27 04:56 net 4a21185cda0f ffec44b5 .config log report
ci-upstream-net-this-kasan-gce 2020/06/25 08:50 net b835a71ef64a 54566aff .config log report
ci-upstream-net-this-kasan-gce 2020/06/24 11:49 net b835a71ef64a 54566aff .config log report
ci-upstream-net-kasan-gce 2020/07/12 03:00 net-next a594920f8747 18d18b59 .config log report
ci-upstream-net-kasan-gce 2020/07/11 07:46 net-next a594920f8747 18d18b59 .config log report
ci-upstream-net-kasan-gce 2020/07/10 04:15 net-next e80a07b244dd bc238812 .config log report
ci-upstream-net-kasan-gce 2020/07/10 01:27 net-next e80a07b244dd bc238812 .config log report
ci-upstream-net-kasan-gce 2020/07/09 20:57 net-next e80a07b244dd bc238812 .config log report
ci-upstream-net-kasan-gce 2020/07/09 19:46 net-next e80a07b244dd bc238812 .config log report
ci-upstream-net-kasan-gce 2020/07/09 18:25 net-next e80a07b244dd bc238812 .config log report
ci-upstream-net-kasan-gce 2020/07/09 14:39 net-next e80a07b244dd bc238812 .config log report
ci-upstream-net-kasan-gce 2020/07/09 13:38 net-next e80a07b244dd bc238812 .config log report
ci-upstream-net-kasan-gce 2020/07/09 06:01 net-next e80a07b244dd bc238812 .config log report
ci-upstream-net-kasan-gce 2020/07/08 20:03 net-next e44f65fd666c 51095195 .config log report
ci-upstream-net-kasan-gce 2020/07/08 11:28 net-next e44f65fd666c 51095195 .config log report
ci-upstream-net-kasan-gce 2020/07/08 09:24 net-next e44f65fd666c 51095195 .config log report
ci-upstream-net-kasan-gce 2020/07/07 06:14 net-next e44f65fd666c 51095195 .config log report
ci-upstream-net-kasan-gce 2020/07/07 02:16 net-next e44f65fd666c 51095195 .config log report
ci-upstream-net-kasan-gce 2020/07/07 00:12 net-next e44f65fd666c 51095195 .config log report
ci-upstream-net-kasan-gce 2020/07/06 17:03 net-next e44f65fd666c 51095195 .config log report
ci-upstream-net-kasan-gce 2020/07/06 11:59 net-next e44f65fd666c 51095195 .config log report
ci-upstream-net-kasan-gce 2020/07/06 07:28 net-next e44f65fd666c 51095195 .config log report
ci-upstream-net-kasan-gce 2020/07/06 03:50 net-next e44f65fd666c 51095195 .config log report
ci-upstream-net-kasan-gce 2020/07/06 01:29 net-next e44f65fd666c 51095195 .config log report
ci-upstream-net-kasan-gce 2020/07/05 22:24 net-next e44f65fd666c 51095195 .config log report
ci-upstream-net-kasan-gce 2020/07/05 09:41 net-next e44f65fd666c 51095195 .config log report
ci-upstream-net-kasan-gce 2020/07/04 09:19 net-next e44f65fd666c 51095195 .config log report
ci-upstream-net-kasan-gce 2020/07/04 05:58 net-next e44f65fd666c 51095195 .config log report
ci-upstream-net-kasan-gce 2020/07/04 02:28 net-next e44f65fd666c 51095195 .config log report
ci-upstream-net-kasan-gce 2020/07/03 18:21 net-next 23212a700773 bed10395 .config log report
ci-upstream-net-kasan-gce 2020/07/03 16:08 net-next 23212a700773 bed10395 .config log report
ci-upstream-net-kasan-gce 2020/07/03 14:49 net-next 23212a700773 bed10395 .config log report
ci-upstream-net-kasan-gce 2020/07/03 07:54 net-next 23212a700773 bed10395 .config log report
ci-upstream-net-kasan-gce 2020/07/03 04:52 net-next 23212a700773 bed10395 .config log report
ci-upstream-net-kasan-gce 2020/07/03 02:34 net-next 23212a700773 bed10395 .config log report
ci-upstream-net-kasan-gce 2020/07/02 22:41 net-next 23212a700773 bed10395 .config log report
ci-upstream-net-kasan-gce 2020/07/02 21:19 net-next 23212a700773 bed10395 .config log report
ci-upstream-net-kasan-gce 2020/07/02 15:18 net-next 23212a700773 bed10395 .config log report
ci-upstream-net-kasan-gce 2020/07/02 14:17 net-next 23212a700773 bed10395 .config log report
ci-upstream-net-kasan-gce 2020/07/02 08:18 net-next 23212a700773 bed10395 .config log report
ci-upstream-net-kasan-gce 2020/07/02 06:47 net-next 23212a700773 bed10395 .config log report
ci-upstream-net-kasan-gce 2020/07/01 22:42 net-next 2b04a6615615 39acb39d .config log report
ci-upstream-net-kasan-gce 2020/07/01 12:50 net-next 2b04a6615615 39acb39d .config log report
ci-upstream-net-kasan-gce 2020/07/01 08:31 net-next 491f14db45dc 917afeaa .config log report
ci-upstream-net-kasan-gce 2020/07/01 01:07 net-next 491f14db45dc 917afeaa .config log report
ci-upstream-net-kasan-gce 2020/06/30 14:05 net-next b08866f42a87 a2cdad9d .config log report
ci-upstream-net-kasan-gce 2020/06/30 04:35 net-next b08866f42a87 a2cdad9d .config log report
ci-upstream-net-kasan-gce 2020/06/30 02:56 net-next b08866f42a87 a2cdad9d .config log report
ci-upstream-net-kasan-gce 2020/06/30 00:36 net-next b08866f42a87 a2cdad9d .config log report
ci-upstream-net-kasan-gce 2020/06/29 19:10 net-next b08866f42a87 a2cdad9d .config log report
ci-upstream-net-kasan-gce 2020/06/29 15:45 net-next b08866f42a87 a2cdad9d .config log report
ci-upstream-net-kasan-gce 2020/06/29 15:16 net-next b08866f42a87 a2cdad9d .config log report
ci-upstream-net-kasan-gce 2020/06/29 12:47 net-next b08866f42a87 a2cdad9d .config log report
ci-upstream-net-kasan-gce 2020/06/29 11:13 net-next b08866f42a87 a2cdad9d .config log report
ci-upstream-net-kasan-gce 2020/06/29 02:10 net-next b08866f42a87 a2cdad9d .config log report
ci-upstream-net-kasan-gce 2020/06/28 23:54 net-next b08866f42a87 a2cdad9d .config log report
ci-upstream-net-kasan-gce 2020/06/28 20:56 net-next b08866f42a87 a2cdad9d .config log report
ci-upstream-net-kasan-gce 2020/06/28 20:28 net-next b08866f42a87 a2cdad9d .config log report
ci-upstream-net-kasan-gce 2020/06/27 18:18 net-next 7bed14551659 ffec44b5 .config log report
ci-upstream-net-kasan-gce 2020/06/27 10:55 net-next 7bed14551659 ffec44b5 .config log report