bisecting cause commit starting from ae6088216ce4b99b3a4aaaccd2eb2dd40d473d42 building syzkaller on 1bcd407ecba1040897a39ee75c8d2da609313eb5 testing commit ae6088216ce4b99b3a4aaaccd2eb2dd40d473d42 with gcc (GCC) 8.1.0 kernel signature: ec34f78117d6400ea7f5f9a86218935b6e339f2b run #0: crashed: WARNING in mark_lock run #1: crashed: WARNING: bad unlock balance in __dev_queue_xmit run #2: crashed: WARNING: bad unlock balance in __dev_queue_xmit run #3: crashed: WARNING: bad unlock balance in __dev_queue_xmit run #4: crashed: WARNING: bad unlock balance in __dev_queue_xmit run #5: crashed: WARNING: bad unlock balance in __dev_queue_xmit run #6: crashed: WARNING: bad unlock balance in __dev_queue_xmit run #7: crashed: WARNING: bad unlock balance in __dev_queue_xmit run #8: OK run #9: OK testing release v5.4 testing commit 219d54332a09e8d8741c1e1982f5eae56099de85 with gcc (GCC) 8.1.0 kernel signature: 6ac0e921eecde8c938014714fbd0f1b76b7cbe6a all runs: crashed: BUG: MAX_LOCKDEP_KEYS too low! testing release v5.3 testing commit 4d856f72c10ecb060868ed10ff1b1453943fc6c8 with gcc (GCC) 8.1.0 kernel signature: 25090e22a6fd05f96999bd87f6e30e9f3798af1e all runs: OK # git bisect start 219d54332a09e8d8741c1e1982f5eae56099de85 4d856f72c10ecb060868ed10ff1b1453943fc6c8 Bisecting: 7882 revisions left to test after this (roughly 13 steps) [a9f8b38a071b468276a243ea3ea5a0636e848cf2] Merge tag 'for-linus-5.4-1' of git://github.com/cminyard/linux-ipmi testing commit a9f8b38a071b468276a243ea3ea5a0636e848cf2 with gcc (GCC) 8.1.0 kernel signature: b169b05e7ecf25b6f6289820d7585bed2c5f192c all runs: OK # git bisect good a9f8b38a071b468276a243ea3ea5a0636e848cf2 Bisecting: 3941 revisions left to test after this (roughly 12 steps) [0a3775e4f883912944481cf2ef36eb6383a9cc74] ocfs2: wait for recovering done after direct unlock request testing commit 0a3775e4f883912944481cf2ef36eb6383a9cc74 with gcc (GCC) 8.1.0 kernel signature: d63c8ee62c08bf37c3f0c53f54daac2d9353ba79 all runs: OK # git bisect good 0a3775e4f883912944481cf2ef36eb6383a9cc74 Bisecting: 1972 revisions left to test after this (roughly 11 steps) [63f9bff56beb718ac0a2eb8398a98220b1e119dc] Merge tag 'mips_fixes_5.4_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux testing commit 63f9bff56beb718ac0a2eb8398a98220b1e119dc with gcc (GCC) 8.1.0 kernel signature: 3c404a38ed8f34a2a2999e78ce1dff5d910975a3 all runs: OK # git bisect good 63f9bff56beb718ac0a2eb8398a98220b1e119dc Bisecting: 988 revisions left to test after this (roughly 10 steps) [65a5bf1c790039dc194507563478137b4314a59d] Merge tag 'pm-5.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm testing commit 65a5bf1c790039dc194507563478137b4314a59d with gcc (GCC) 8.1.0 kernel signature: 387a4d25f66c13c5974d944fffb973c0a1b69214 all runs: OK # git bisect good 65a5bf1c790039dc194507563478137b4314a59d Bisecting: 441 revisions left to test after this (roughly 9 steps) [0058b0a506e40d9a2c62015fe92eb64a44d78cd9] Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net testing commit 0058b0a506e40d9a2c62015fe92eb64a44d78cd9 with gcc (GCC) 8.1.0 kernel signature: a3d5b9f41fc73c12371736de570ceab33ecd31e3 all runs: crashed: BUG: MAX_LOCKDEP_KEYS too low! # git bisect bad 0058b0a506e40d9a2c62015fe92eb64a44d78cd9 Bisecting: 272 revisions left to test after this (roughly 8 steps) [9d2345057538bb97b1e556508ad69983f446462f] Merge tag 'hwmon-for-v5.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging testing commit 9d2345057538bb97b1e556508ad69983f446462f with gcc (GCC) 8.1.0 kernel signature: 916f21bf70c5a658d6d54c97749abe0422672e74 all runs: crashed: BUG: MAX_LOCKDEP_KEYS too low! # git bisect bad 9d2345057538bb97b1e556508ad69983f446462f Bisecting: 136 revisions left to test after this (roughly 7 steps) [451fe015b2857de3d8027ef606284a205e177724] ixgbe: Remove duplicate clear_bit() call testing commit 451fe015b2857de3d8027ef606284a205e177724 with gcc (GCC) 8.1.0 kernel signature: 51fe79856b5cd8f56cbb49b9c9a74e5c751bd1d2 all runs: crashed: BUG: MAX_LOCKDEP_KEYS too low! # git bisect bad 451fe015b2857de3d8027ef606284a205e177724 Bisecting: 71 revisions left to test after this (roughly 6 steps) [1a51a47491a5a23f0625b03ad6dc84cf39bf6a82] Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf testing commit 1a51a47491a5a23f0625b03ad6dc84cf39bf6a82 with gcc (GCC) 8.1.0 kernel signature: b164beeb3f31e22d6c9c1d0c89ec034fc530127a all runs: crashed: BUG: MAX_LOCKDEP_KEYS too low! # git bisect bad 1a51a47491a5a23f0625b03ad6dc84cf39bf6a82 Bisecting: 32 revisions left to test after this (roughly 5 steps) [76db2d466f6a929a04775f0f87d837e3bcba44e8] net: phy: smsc: LAN8740: add PHY_RST_AFTER_CLK_EN flag testing commit 76db2d466f6a929a04775f0f87d837e3bcba44e8 with gcc (GCC) 8.1.0 kernel signature: f224851a9ad0fcde5f497f9ac5c0870f6997ce82 all runs: OK # git bisect good 76db2d466f6a929a04775f0f87d837e3bcba44e8 Bisecting: 16 revisions left to test after this (roughly 4 steps) [f536dffc0b79738c3104af999318279dccbaa261] net/smc: fix closing of fallback SMC sockets testing commit f536dffc0b79738c3104af999318279dccbaa261 with gcc (GCC) 8.1.0 kernel signature: 58f7915f91adff35671da51f610463a7ae1ba268 all runs: crashed: BUG: MAX_LOCKDEP_KEYS too low! # git bisect bad f536dffc0b79738c3104af999318279dccbaa261 Bisecting: 7 revisions left to test after this (roughly 3 steps) [32b6d34fedc2229cdf6a047fdbc0704085441915] net: core: add ignore flag to netdev_adjacent structure testing commit 32b6d34fedc2229cdf6a047fdbc0704085441915 with gcc (GCC) 8.1.0 kernel signature: 08c1643630a0608b971fcf2e401dc09a90427af3 all runs: crashed: BUG: MAX_LOCKDEP_KEYS too low! # git bisect bad 32b6d34fedc2229cdf6a047fdbc0704085441915 Bisecting: 3 revisions left to test after this (roughly 2 steps) [65de65d9033750d2cf1b336c9d6e9da3a8b5cc6e] bonding: fix unexpected IFF_BONDING bit unset testing commit 65de65d9033750d2cf1b336c9d6e9da3a8b5cc6e with gcc (GCC) 8.1.0 kernel signature: a9337160342b713d4eb09e8009e85d286e8a80ce all runs: crashed: BUG: MAX_LOCKDEP_KEYS too low! # git bisect bad 65de65d9033750d2cf1b336c9d6e9da3a8b5cc6e Bisecting: 1 revision left to test after this (roughly 1 step) [5343da4c17429efaa5fb1594ea96aee1a283e694] net: core: limit nested device depth testing commit 5343da4c17429efaa5fb1594ea96aee1a283e694 with gcc (GCC) 8.1.0 kernel signature: b3b02b0e653a4cc8e0b38c52589fbaf129231777 all runs: OK # git bisect good 5343da4c17429efaa5fb1594ea96aee1a283e694 Bisecting: 0 revisions left to test after this (roughly 0 steps) [ab92d68fc22f9afab480153bd82a20f6e2533769] net: core: add generic lockdep keys testing commit ab92d68fc22f9afab480153bd82a20f6e2533769 with gcc (GCC) 8.1.0 kernel signature: eec8935ad5a330f1331f5d81bc583ff0a5073c24 all runs: crashed: BUG: MAX_LOCKDEP_KEYS too low! # git bisect bad ab92d68fc22f9afab480153bd82a20f6e2533769 ab92d68fc22f9afab480153bd82a20f6e2533769 is the first bad commit commit ab92d68fc22f9afab480153bd82a20f6e2533769 Author: Taehee Yoo Date: Mon Oct 21 18:47:51 2019 +0000 net: core: add generic lockdep keys Some interface types could be nested. (VLAN, BONDING, TEAM, MACSEC, MACVLAN, IPVLAN, VIRT_WIFI, VXLAN, etc..) These interface types should set lockdep class because, without lockdep class key, lockdep always warn about unexisting circular locking. In the current code, these interfaces have their own lockdep class keys and these manage itself. So that there are so many duplicate code around the /driver/net and /net/. This patch adds new generic lockdep keys and some helper functions for it. This patch does below changes. a) Add lockdep class keys in struct net_device - qdisc_running, xmit, addr_list, qdisc_busylock - these keys are used as dynamic lockdep key. b) When net_device is being allocated, lockdep keys are registered. - alloc_netdev_mqs() c) When net_device is being free'd llockdep keys are unregistered. - free_netdev() d) Add generic lockdep key helper function - netdev_register_lockdep_key() - netdev_unregister_lockdep_key() - netdev_update_lockdep_key() e) Remove unnecessary generic lockdep macro and functions f) Remove unnecessary lockdep code of each interfaces. After this patch, each interface modules don't need to maintain their lockdep keys. Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 1 - drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 18 --- drivers/net/hamradio/bpqether.c | 22 ---- drivers/net/hyperv/netvsc_drv.c | 2 - drivers/net/ipvlan/ipvlan_main.c | 2 - drivers/net/macsec.c | 5 - drivers/net/macvlan.c | 12 -- drivers/net/ppp/ppp_generic.c | 2 - drivers/net/team/team.c | 2 - drivers/net/vrf.c | 1 - drivers/net/wireless/intersil/hostap/hostap_hw.c | 25 ----- include/linux/netdevice.h | 35 +++--- net/8021q/vlan_dev.c | 27 ----- net/batman-adv/soft-interface.c | 32 ------ net/bluetooth/6lowpan.c | 8 -- net/bridge/br_device.c | 8 -- net/core/dev.c | 127 ++++++++-------------- net/core/rtnetlink.c | 1 + net/dsa/master.c | 5 - net/dsa/slave.c | 12 -- net/ieee802154/6lowpan/core.c | 8 -- net/l2tp/l2tp_eth.c | 1 - net/netrom/af_netrom.c | 23 ---- net/rose/af_rose.c | 23 ---- net/sched/sch_generic.c | 17 +-- 25 files changed, 63 insertions(+), 356 deletions(-) culprit signature: eec8935ad5a330f1331f5d81bc583ff0a5073c24 parent signature: b3b02b0e653a4cc8e0b38c52589fbaf129231777 revisions tested: 17, total time: 4h13m11.930526135s (build: 1h44m27.366212797s, test: 2h27m23.733452749s) first bad commit: ab92d68fc22f9afab480153bd82a20f6e2533769 net: core: add generic lockdep keys cc: ["a@unstable.cc" "alex.aring@gmail.com" "allison@lohutok.net" "andrew@lunn.ch" "andy@greyhouse.net" "ap420073@gmail.com" "ast@domdv.de" "b.a.t.m.a.n@lists.open-mesh.org" "bridge@lists.linux-foundation.org" "cleech@redhat.com" "daniel@iogearbox.net" "davem@davemloft.net" "dsa@cumulusnetworks.com" "f.fainelli@gmail.com" "fw@strlen.de" "gregkh@linuxfoundation.org" "gustavo@embeddedor.com" "haiyangz@microsoft.com" "info@metux.net" "j.vosburgh@gmail.com" "j@w1.fi" "jakub.kicinski@netronome.com" "jhs@mojatatu.com" "jiri@resnulli.us" "johan.hedberg@gmail.com" "johannes.berg@intel.com" "john.hurley@netronome.com" "jwi@linux.ibm.com" "kstewart@linuxfoundation.org" "kvalo@codeaurora.org" "kys@microsoft.com" "linmiaohe@huawei.com" "linux-bluetooth@vger.kernel.org" "linux-hams@vger.kernel.org" "linux-hyperv@vger.kernel.org" "linux-kernel@vger.kernel.org" "linux-ppp@vger.kernel.org" "linux-wireless@vger.kernel.org" "linux-wpan@vger.kernel.org" "liuhangbin@gmail.com" "marcel@holtmann.org" "mareklindner@neomailbox.ch" "mkubecek@suse.cz" "mmanning@vyatta.att-mail.com" "netdev@vger.kernel.org" "nikolay@cumulusnetworks.com" "oss-drivers@netronome.com" "pabeni@redhat.com" "paulus@samba.org" "ralf@linux-mips.org"] crash: BUG: MAX_LOCKDEP_KEYS too low! BUG: MAX_LOCKDEP_KEYS too low! turning off the locking correctness validator. CPU: 0 PID: 3703 Comm: syz-executor.1 Not tainted 5.4.0-rc3-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+0x113/0x167 lib/dump_stack.c:113 register_lock_class.cold.69+0x1a/0x26 kernel/locking/lockdep.c:1222 __lock_acquire+0xff/0x4ef0 kernel/locking/lockdep.c:3837 lock_acquire+0x194/0x410 kernel/locking/lockdep.c:4487 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:175 spin_lock_bh include/linux/spinlock.h:343 [inline] netif_addr_lock_bh include/linux/netdevice.h:4066 [inline] __dev_mc_add+0x27/0xb0 net/core/dev_addr_lists.c:765 dev_mc_add+0xb/0x10 net/core/dev_addr_lists.c:783 igmp6_group_added+0x2da/0x370 net/ipv6/mcast.c:672 __ipv6_dev_mc_inc+0x5fe/0x970 net/ipv6/mcast.c:931 ipv6_dev_mc_inc+0xb/0x10 net/ipv6/mcast.c:938 ipv6_add_dev+0x882/0xed0 net/ipv6/addrconf.c:456 addrconf_notify+0x4de/0x1e60 net/ipv6/addrconf.c:3491 notifier_call_chain+0x8a/0x160 kernel/notifier.c:95 __raw_notifier_call_chain kernel/notifier.c:396 [inline] raw_notifier_call_chain+0x11/0x20 kernel/notifier.c:403 call_netdevice_notifiers_info+0x28/0x60 net/core/dev.c:1668 call_netdevice_notifiers_extack net/core/dev.c:1680 [inline] call_netdevice_notifiers net/core/dev.c:1694 [inline] register_netdevice+0x82e/0x1020 net/core/dev.c:8945 br_dev_newlink+0x25/0x100 net/bridge/br_netlink.c:1315 __rtnl_newlink+0xcb9/0x13f0 net/core/rtnetlink.c:3197 rtnl_newlink+0x61/0x90 net/core/rtnetlink.c:3255 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:5224 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:5242 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x43b/0x640 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x74b/0xc00 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:657 ___sys_sendmsg+0x647/0x950 net/socket.c:2311 __sys_sendmsg+0xd9/0x180 net/socket.c:2356 __do_sys_sendmsg net/socket.c:2365 [inline] __se_sys_sendmsg net/socket.c:2363 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2363 do_syscall_64+0xca/0x5d0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45af49 Code: ad 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fc73f21cc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045af49 RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000006 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fc73f21d6d4 R13: 00000000004ca9a0 R14: 00000000004e3d80 R15: 00000000ffffffff kobject: 'brif' (000000009ee2fe96): kobject_add_internal: parent: 'bridge974', set: '' kobject: 'batman_adv' (000000009a0dfd71): kobject_add_internal: parent: 'bridge974', set: ''