bisecting cause commit starting from 0e3f1ad80fc8cb0c517fd9a9afb22752b741fa76 building syzkaller on 048f2d494ee4a016e2386c28bf8cccdd87896cbd testing commit 0e3f1ad80fc8cb0c517fd9a9afb22752b741fa76 with gcc (GCC) 8.1.0 all runs: crashed: BUG: MAX_LOCKDEP_ENTRIES too low! testing release v5.3 testing commit 4d856f72c10ecb060868ed10ff1b1453943fc6c8 with gcc (GCC) 8.1.0 all runs: OK # git bisect start 0e3f1ad80fc8cb0c517fd9a9afb22752b741fa76 4d856f72c10ecb060868ed10ff1b1453943fc6c8 Bisecting: 7716 revisions left to test after this (roughly 13 steps) [bd55f8ddbc437c225391ca8f487e7ec10243c4cc] net: netsec: Fix signedness bug in netsec_probe() testing commit bd55f8ddbc437c225391ca8f487e7ec10243c4cc with gcc (GCC) 8.1.0 all runs: OK # git bisect good bd55f8ddbc437c225391ca8f487e7ec10243c4cc Bisecting: 3865 revisions left to test after this (roughly 12 steps) [fbc246a12aac27f7b25a37f9398bb3bc552cec92] Merge tag 'f2fs-for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs testing commit fbc246a12aac27f7b25a37f9398bb3bc552cec92 with gcc (GCC) 8.1.0 all runs: OK # git bisect good fbc246a12aac27f7b25a37f9398bb3bc552cec92 Bisecting: 1920 revisions left to test after this (roughly 11 steps) [9819a30c11ea439e5e3c81f5539c4d42d6c76314] Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net testing commit 9819a30c11ea439e5e3c81f5539c4d42d6c76314 with gcc (GCC) 8.1.0 all runs: OK # git bisect good 9819a30c11ea439e5e3c81f5539c4d42d6c76314 Bisecting: 959 revisions left to test after this (roughly 10 steps) [33e4980532fd0b6727bdb15efe1b73adf741f36a] Merge tag 'wireless-drivers-2019-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers testing commit 33e4980532fd0b6727bdb15efe1b73adf741f36a with gcc (GCC) 8.1.0 all runs: crashed: BUG: MAX_LOCKDEP_ENTRIES too low! # git bisect bad 33e4980532fd0b6727bdb15efe1b73adf741f36a Bisecting: 480 revisions left to test after this (roughly 9 steps) [02755af0f322fd1d2d7995c1e9fd6f9668511560] Merge branch 'parisc-5.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux testing commit 02755af0f322fd1d2d7995c1e9fd6f9668511560 with gcc (GCC) 8.1.0 all runs: OK # git bisect good 02755af0f322fd1d2d7995c1e9fd6f9668511560 Bisecting: 307 revisions left to test after this (roughly 8 steps) [998d75510e373aab5644d777d3b058312d550159] Merge branch 'akpm' (patches from Andrew) testing commit 998d75510e373aab5644d777d3b058312d550159 with gcc (GCC) 8.1.0 all runs: OK # git bisect good 998d75510e373aab5644d777d3b058312d550159 Bisecting: 153 revisions left to test after this (roughly 7 steps) [500f36a485862cee15752b58a5a9a50c1f59ff58] net/mlx5e: Tx, Zero-memset WQE info struct upon update testing commit 500f36a485862cee15752b58a5a9a50c1f59ff58 with gcc (GCC) 8.1.0 all runs: OK # git bisect good 500f36a485862cee15752b58a5a9a50c1f59ff58 Bisecting: 79 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 all runs: crashed: BUG: MAX_LOCKDEP_ENTRIES too low! # git bisect bad 1a51a47491a5a23f0625b03ad6dc84cf39bf6a82 Bisecting: 36 revisions left to test after this (roughly 5 steps) [b5b9181c2403025b2c7ae7ea44333fd8fe6dbb54] selftests: Make l2tp.sh executable testing commit b5b9181c2403025b2c7ae7ea44333fd8fe6dbb54 with gcc (GCC) 8.1.0 all runs: OK # git bisect good b5b9181c2403025b2c7ae7ea44333fd8fe6dbb54 Bisecting: 18 revisions left to test after this (roughly 4 steps) [3f6b2c4420610cf0882b395338c0daee15dc102d] net: mvneta: make stub functions static inline testing commit 3f6b2c4420610cf0882b395338c0daee15dc102d with gcc (GCC) 8.1.0 all runs: crashed: BUG: MAX_LOCKDEP_ENTRIES too low! # git bisect bad 3f6b2c4420610cf0882b395338c0daee15dc102d Bisecting: 8 revisions left to test after this (roughly 3 steps) [089bca2caed0d0dea7da235ce1fe245808f5ec02] bonding: use dynamic lockdep key instead of subclass testing commit 089bca2caed0d0dea7da235ce1fe245808f5ec02 with gcc (GCC) 8.1.0 all runs: crashed: BUG: MAX_LOCKDEP_ENTRIES too low! # git bisect bad 089bca2caed0d0dea7da235ce1fe245808f5ec02 Bisecting: 4 revisions left to test after this (roughly 2 steps) [76db2d466f6a929a04775f0f87d837e3bcba44e8] net: phy: smsc: LAN8740: add PHY_RST_AFTER_CLK_EN flag testing commit 76db2d466f6a929a04775f0f87d837e3bcba44e8 with gcc (GCC) 8.1.0 all runs: OK # git bisect good 76db2d466f6a929a04775f0f87d837e3bcba44e8 Bisecting: 2 revisions left to test after this (roughly 1 step) [5343da4c17429efaa5fb1594ea96aee1a283e694] net: core: limit nested device depth testing commit 5343da4c17429efaa5fb1594ea96aee1a283e694 with gcc (GCC) 8.1.0 all runs: OK # git bisect good 5343da4c17429efaa5fb1594ea96aee1a283e694 Bisecting: 0 revisions left to test after this (roughly 1 step) [65de65d9033750d2cf1b336c9d6e9da3a8b5cc6e] bonding: fix unexpected IFF_BONDING bit unset testing commit 65de65d9033750d2cf1b336c9d6e9da3a8b5cc6e with gcc (GCC) 8.1.0 all runs: crashed: BUG: MAX_LOCKDEP_ENTRIES too low! # git bisect bad 65de65d9033750d2cf1b336c9d6e9da3a8b5cc6e 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 all runs: crashed: BUG: MAX_LOCKDEP_ENTRIES 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 :040000 040000 48b70c86ecac7d18f25995cfd834afc9716a893d cd0d4024b2242c910f727046de63cb6d70340a11 M drivers :040000 040000 0015f24c6d9c1710c7d74e2aa35a48934b1194a3 6ce529d9331493da9f35c05763ac76d78336455a M include :040000 040000 2beb5bddec99cb7fb2fed15ecee03862639a37fe 3da40dacf9853f8e54e6de8cf5b373bf32e05ec4 M net revisions tested: 17, total time: 4h18m22.307580605s (build: 1h41m38.182282149s, test: 2h30m54.34747749s) 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" "gbastien@versatic.net" "gregkh@linuxfoundation.org" "gustavo@embeddedor.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" "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" "mcroce@redhat.com" "mkubecek@suse.cz" "mmanning@vyatta.att-mail.com" "netdev@vger.kernel.org" "nikolay@cumulusnetworks.com"] crash: BUG: MAX_LOCKDEP_ENTRIES too low! BUG: MAX_LOCKDEP_ENTRIES too low! turning off the locking correctness validator. CPU: 0 PID: 21221 Comm: syz-executor.1 Not tainted 5.4.0-rc3+ #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 alloc_list_entry.cold.51+0x11/0x18 kernel/locking/lockdep.c:1292 add_lock_to_list kernel/locking/lockdep.c:1313 [inline] check_prev_add kernel/locking/lockdep.c:2528 [inline] check_prevs_add kernel/locking/lockdep.c:2581 [inline] validate_chain kernel/locking/lockdep.c:2971 [inline] __lock_acquire+0x2d21/0x4ef0 kernel/locking/lockdep.c:3955 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+0x5f5/0x980 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/0x1fe0 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 internal_dev_create+0x2bf/0x4d0 net/openvswitch/vport-internal_dev.c:191 ovs_vport_add+0x25c/0x500 net/openvswitch/vport.c:199 new_vport+0x15/0x1f0 net/openvswitch/datapath.c:194 ovs_dp_cmd_new+0x414/0xc20 net/openvswitch/datapath.c:1644 genl_family_rcv_msg+0x5cc/0x1150 net/netlink/genetlink.c:629 genl_rcv_msg+0xa7/0x140 net/netlink/genetlink.c:654 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2477 genl_rcv+0x23/0x40 net/netlink/genetlink.c:665 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x43f/0x630 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x75d/0xc40 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:0x45a219 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:00007f9b8ba10c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a219 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f9b8ba116d4 R13: 00000000004c86ec R14: 00000000004decb0 R15: 00000000ffffffff kobject: 'batman_adv' (00000000e4155f12): kobject_add_internal: parent: '718n', set: '' device 718n entered promiscuous mode