syzbot


possible deadlock in dev_uc_sync_multiple (2)

Status: fixed on 2020/07/20 08:03
Subsystems: net
[Documentation on labels]
Fix commit: be74294ffa24 net: get rid of lockdep_set_class_and_subclass()
First crash: 1621d, last: 1611d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in dev_uc_sync_multiple (3) net 1 1556d 1552d 0/28 auto-closed as invalid on 2020/12/31 04:17
linux-4.14 possible deadlock in dev_uc_sync_multiple (3) 1 658d 658d 0/1 upstream: reported on 2023/02/17 11:15
linux-4.19 possible deadlock in dev_uc_sync_multiple (3) C error 7 672d 851d 0/1 upstream: reported C repro on 2022/08/08 00:40
linux-4.19 possible deadlock in dev_uc_sync_multiple (2) 11 989d 1169d 0/1 auto-closed as invalid on 2022/07/21 03:12
upstream possible deadlock in dev_uc_sync_multiple net 1 2093d 2092d 0/28 auto-closed as invalid on 2019/09/11 09:05
linux-4.19 possible deadlock in dev_uc_sync_multiple 1 1572d 1572d 0/1 auto-closed as invalid on 2020/12/15 01:55
linux-4.14 possible deadlock in dev_uc_sync_multiple (2) 9 784d 1071d 0/1 auto-obsoleted due to no activity on 2023/02/11 03:42
linux-4.14 possible deadlock in dev_uc_sync_multiple 4 1325d 1557d 0/1 auto-closed as invalid on 2021/08/19 17:04

Sample crash report:
device bridge_slave_1 left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
device bridge_slave_0 left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
============================================
WARNING: possible recursive locking detected
5.8.0-rc2-syzkaller #0 Not tainted
--------------------------------------------
kworker/u4:7/8825 is trying to acquire lock:
ffff888059710280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: netif_addr_lock_nested include/linux/netdevice.h:4243 [inline]
ffff888059710280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: dev_uc_sync_multiple+0xdc/0x190 net/core/dev_addr_lists.c:670

but task is already holding lock:
ffff88808ec48280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:358 [inline]
ffff88808ec48280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: netif_addr_lock_bh include/linux/netdevice.h:4248 [inline]
ffff88808ec48280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: dev_mc_unsync net/core/dev_addr_lists.c:914 [inline]
ffff88808ec48280 (&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

7 locks held by kworker/u4:7/8825:
 #0: ffff8880a97ad138 ((wq_completion)netns){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff8880a97ad138 ((wq_completion)netns){+.+.}-{0:0}, at: atomic64_set include/asm-generic/atomic-instrumented.h:856 [inline]
 #0: ffff8880a97ad138 ((wq_completion)netns){+.+.}-{0:0}, at: atomic_long_set include/asm-generic/atomic-long.h:41 [inline]
 #0: ffff8880a97ad138 ((wq_completion)netns){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:616 [inline]
 #0: ffff8880a97ad138 ((wq_completion)netns){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:643 [inline]
 #0: ffff8880a97ad138 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x82b/0x1670 kernel/workqueue.c:2240
 #1: ffffc90004497da8 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x85f/0x1670 kernel/workqueue.c:2244
 #2: ffffffff8a7a48b0 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0x9b/0xa00 net/core/net_namespace.c:565
 #3: ffffffff8a7b1728 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock_unregistering net/core/dev.c:10557 [inline]
 #3: ffffffff8a7b1728 (rtnl_mutex){+.+.}-{3:3}, at: default_device_exit_batch+0xea/0x3d0 net/core/dev.c:10595
 #4: ffff88808ec48280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:358 [inline]
 #4: ffff88808ec48280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: netif_addr_lock_bh include/linux/netdevice.h:4248 [inline]
 #4: ffff88808ec48280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: dev_mc_unsync net/core/dev_addr_lists.c:914 [inline]
 #4: ffff88808ec48280 (&vlan_netdev_addr_lock_key/1){+...}-{2:2}, at: dev_mc_unsync+0xb0/0x190 net/core/dev_addr_lists.c:909
 #5: ffff88805cfbc280 (&dev_addr_list_lock_key#2/2){+...}-{2:2}, at: netif_addr_lock_nested include/linux/netdevice.h:4243 [inline]
 #5: ffff88805cfbc280 (&dev_addr_list_lock_key#2/2){+...}-{2:2}, at: dev_mc_unsync net/core/dev_addr_lists.c:915 [inline]
 #5: ffff88805cfbc280 (&dev_addr_list_lock_key#2/2){+...}-{2:2}, at: dev_mc_unsync+0xf4/0x190 net/core/dev_addr_lists.c:909
 #6: ffffffff89bbe640 (rcu_read_lock){....}-{1:2}, at: team_set_rx_mode+0x0/0x220 drivers/net/team/team.c:857

stack backtrace:
CPU: 1 PID: 8825 Comm: kworker/u4:7 Not tainted 5.8.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: netns cleanup_net
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_uc_sync_multiple+0xdc/0x190 net/core/dev_addr_lists.c:670
 team_set_rx_mode+0xce/0x220 drivers/net/team/team.c:1779
 __dev_set_rx_mode+0x1ea/0x300 net/core/dev.c:8207
 dev_mc_unsync net/core/dev_addr_lists.c:917 [inline]
 dev_mc_unsync+0x139/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:1605
 dev_close_many+0x238/0x650 net/core/dev.c:1630
 rollback_registered_many+0x3af/0xf60 net/core/dev.c:8953
 unregister_netdevice_many.part.0+0x1a/0x2f0 net/core/dev.c:10121
 unregister_netdevice_many net/core/dev.c:10120 [inline]
 default_device_exit_batch+0x30c/0x3d0 net/core/dev.c:10604
 ops_exit_list+0x10d/0x160 net/core/net_namespace.c:189
 cleanup_net+0x4ea/0xa00 net/core/net_namespace.c:603
 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269
 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415
 kthread+0x3b5/0x4a0 kernel/kthread.c:291
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293
device veth1_macvtap left promiscuous mode
device veth0_macvtap left promiscuous mode
device veth1_vlan left promiscuous mode
device veth0_vlan left promiscuous mode
team0 (unregistering): Port device vlan2 removed

Crashes (26):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/07/09 20:10 net-next-old e80a07b244dd bc238812 .config console log report ci-upstream-net-kasan-gce
2020/07/09 11:27 net-next-old e80a07b244dd bc238812 .config console log report ci-upstream-net-kasan-gce
2020/07/08 20:34 net-next-old e44f65fd666c 51095195 .config console log report ci-upstream-net-kasan-gce
2020/07/08 20:12 net-next-old e44f65fd666c 51095195 .config console log report ci-upstream-net-kasan-gce
2020/07/07 18:05 net-next-old e44f65fd666c 51095195 .config console log report ci-upstream-net-kasan-gce
2020/07/07 11:14 net-next-old e44f65fd666c 51095195 .config console log report ci-upstream-net-kasan-gce
2020/07/07 06:48 net-next-old e44f65fd666c 51095195 .config console log report ci-upstream-net-kasan-gce
2020/07/07 01:50 net-next-old e44f65fd666c 51095195 .config console log report ci-upstream-net-kasan-gce
2020/07/06 23:08 net-next-old e44f65fd666c 51095195 .config console log report ci-upstream-net-kasan-gce
2020/07/06 08:49 net-next-old e44f65fd666c 51095195 .config console log report ci-upstream-net-kasan-gce
2020/07/06 04:18 net-next-old e44f65fd666c 51095195 .config console log report ci-upstream-net-kasan-gce
2020/07/05 22:15 net-next-old e44f65fd666c 51095195 .config console log report ci-upstream-net-kasan-gce
2020/07/05 08:03 net-next-old e44f65fd666c 51095195 .config console log report ci-upstream-net-kasan-gce
2020/07/05 03:28 net-next-old e44f65fd666c 51095195 .config console log report ci-upstream-net-kasan-gce
2020/07/04 23:01 net-next-old e44f65fd666c 51095195 .config console log report ci-upstream-net-kasan-gce
2020/07/04 10:24 net-next-old e44f65fd666c 51095195 .config console log report ci-upstream-net-kasan-gce
2020/07/03 17:56 net-next-old 23212a700773 bed10395 .config console log report ci-upstream-net-kasan-gce
2020/07/03 13:14 net-next-old 23212a700773 bed10395 .config console log report ci-upstream-net-kasan-gce
2020/07/03 09:15 net-next-old 23212a700773 bed10395 .config console log report ci-upstream-net-kasan-gce
2020/07/02 21:52 net-next-old 23212a700773 bed10395 .config console log report ci-upstream-net-kasan-gce
2020/06/30 10:27 net-next-old b08866f42a87 a2cdad9d .config console log report ci-upstream-net-kasan-gce
2020/06/30 08:51 net-next-old b08866f42a87 a2cdad9d .config console log report ci-upstream-net-kasan-gce
2020/06/30 05:37 net-next-old b08866f42a87 a2cdad9d .config console log report ci-upstream-net-kasan-gce
2020/06/29 22:02 net-next-old b08866f42a87 a2cdad9d .config console log report ci-upstream-net-kasan-gce
2020/06/29 10:13 net-next-old b08866f42a87 a2cdad9d .config console log report ci-upstream-net-kasan-gce
2020/06/29 07:18 net-next-old b08866f42a87 a2cdad9d .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.