bisecting cause commit starting from 419593dad8439007452bb6f267861863b572c520 building syzkaller on a76bf83ffac5c0bed0a686f8ebc98c74bfb34a0c testing commit 419593dad8439007452bb6f267861863b572c520 with gcc (GCC) 8.1.0 kernel signature: 6dd9819dd49e43bfb2ebff7f14e584f102aa4f88 all runs: crashed: BUG: sleeping function called from invalid context in __alloc_pages_nodemask testing release v5.4 testing commit 219d54332a09e8d8741c1e1982f5eae56099de85 with gcc (GCC) 8.1.0 kernel signature: 3caad10996180e472348045712dfb75c4f4cd45f all runs: crashed: BUG: MAX_LOCKDEP_KEYS too low! testing release v5.3 testing commit 4d856f72c10ecb060868ed10ff1b1453943fc6c8 with gcc (GCC) 8.1.0 kernel signature: 62d253d9d7db43a14d426d099de7caa4a657d683 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: 1537f07c643e1eb3d23a115351b670f938873baa 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: 3f2baca7590ae34549cd401a32f5ed7eec4cdafa 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: 5f03010d5647668b0954004a7a01e3819b834af5 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: d5161ef44d6d6789a40f82e6c9689f07062dd384 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: 173531e528f75559c7602f2053a18ac21c4631e4 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: 9fb2a011084e62d2f60ca581c86bfebbd9b3ec69 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: 344d470999a2f961bd45cea6db38931062f3d108 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: 7e67d01f0a2fa59b0274f331978c306174f51b50 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: a0e0bc3f6510785df1e142f7d1db45bed57db812 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: 4f8b569e494b21ce7879be986047565253ccec76 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: 6c93735f56121ad69861b36eb30438d2d60cff52 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: a491424c60c30121d7498394ef2a564340f37692 run #0: crashed: BUG: MAX_LOCKDEP_KEYS too low! run #1: crashed: BUG: MAX_LOCKDEP_KEYS too low! run #2: crashed: BUG: MAX_LOCKDEP_KEYS too low! run #3: crashed: BUG: MAX_LOCKDEP_KEYS too low! run #4: crashed: BUG: MAX_LOCKDEP_KEYS too low! run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # 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: 2c14b4be9505a7c33702cd5c51a846a076fa41f4 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: 08a4e6671208e7cbf81d1c335274b2bcdee71ea4 run #0: crashed: BUG: MAX_LOCKDEP_KEYS too low! run #1: crashed: BUG: MAX_LOCKDEP_KEYS too low! run #2: crashed: BUG: MAX_LOCKDEP_KEYS too low! run #3: crashed: BUG: MAX_LOCKDEP_KEYS too low! run #4: OK run #5: crashed: BUG: MAX_LOCKDEP_KEYS too low! run #6: OK run #7: OK run #8: crashed: BUG: MAX_LOCKDEP_KEYS too low! run #9: 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(-) kernel signature: 08a4e6671208e7cbf81d1c335274b2bcdee71ea4 previous signature: 2c14b4be9505a7c33702cd5c51a846a076fa41f4 revisions tested: 17, total time: 4h26m32.70949805s (build: 1h49m7.952205834s, test: 2h31m44.874093093s) 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" "edumazet@google.com" "f.fainelli@gmail.com" "fw@strlen.de" "gregkh@linuxfoundation.org" "gustavo@embeddedor.com" "gvaradar@cisco.com" "haiyangz@microsoft.com" "idosch@mellanox.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" "jwi@linux.ibm.com" "kstewart@linuxfoundation.org" "kvalo@codeaurora.org" "kys@microsoft.com" "lariel@mellanox.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" "mcroce@redhat.com" "mkubecek@suse.cz" "mmanning@vyatta.att-mail.com" "netdev@vger.kernel.org" "nikolay@cumulusnetworks.com"] crash: BUG: MAX_LOCKDEP_KEYS too low! BUG: MAX_LOCKDEP_KEYS too low! turning off the locking correctness validator. CPU: 0 PID: 8260 Comm: kworker/u4:6 Not tainted 5.4.0-rc3-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+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 flush_workqueue+0xf2/0x13d0 kernel/workqueue.c:2774 drain_workqueue+0x148/0x3a0 kernel/workqueue.c:2939 destroy_workqueue+0x19/0x5b0 kernel/workqueue.c:4329 bond_destructor+0x37/0x50 drivers/net/bonding/bond_main.c:4291 netdev_run_todo+0x3c1/0x6b0 net/core/dev.c:9177 rtnl_unlock+0x9/0x10 net/core/rtnetlink.c:112 default_device_exit_batch+0x2f8/0x3e0 net/core/dev.c:9977 ops_exit_list.isra.6+0xdf/0x130 net/core/net_namespace.c:175 cleanup_net+0x485/0x9d0 net/core/net_namespace.c:596 process_one_work+0x856/0x1630 kernel/workqueue.c:2269 worker_thread+0x85/0xb60 kernel/workqueue.c:2415 kthread+0x331/0x3f0 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 kobject: 'bond700' (0000000078b876ca): kobject_cleanup, parent 0000000017f25bdc kobject: 'bond700' (0000000078b876ca): calling ktype release kobject: 'bond700': free name kobject: 'bond699' (000000007fa9e859): kobject_cleanup, parent 0000000017f25bdc kobject: 'bond699' (000000007fa9e859): calling ktype release kobject: 'bond699': free name kobject: 'bond698' (000000000e4ecc92): kobject_cleanup, parent 0000000017f25bdc kobject: 'bond698' (000000000e4ecc92): calling ktype release kobject: 'bond698': free name kobject: 'bond697' (000000006c2c2fb2): kobject_cleanup, parent 0000000017f25bdc kobject: 'bond697' (000000006c2c2fb2): calling ktype release kobject: 'bond697': free name