bisecting fixing commit since c3038e718a19fc596f7b1baba0f83d5146dc7784 building syzkaller on 8c88c9c1c99c8cd8dabc951164c820b9c9f25114 testing commit c3038e718a19fc596f7b1baba0f83d5146dc7784 with gcc (GCC) 8.1.0 kernel signature: e64d1865b422a286bf3e33091e4e63ff5b605cd6 all runs: crashed: BUG: sleeping function called from invalid context in htb_destroy testing current HEAD cb1f9a169a0e197f93816ace48a6520e8640809d testing commit cb1f9a169a0e197f93816ace48a6520e8640809d with gcc (GCC) 8.1.0 kernel signature: e8666cf866d3d4990b53a27588e20de8bc697403 all runs: crashed: BUG: sleeping function called from invalid context in htb_destroy revisions tested: 2, total time: 23m41.715967848s (build: 16m38.614856247s, test: 6m33.801020966s) the crash still happens on HEAD commit msg: Linux 4.19.94 crash: BUG: sleeping function called from invalid context in htb_destroy IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_bond: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_team: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): team_slave_0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): team0: link becomes ready BUG: sleeping function called from invalid context at kernel/workqueue.c:2862 in_atomic(): 1, irqs_disabled(): 0, pid: 7051, name: syz-executor.4 2 locks held by syz-executor.4/7051: #0: 00000000dcf8d870 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline] #0: 00000000dcf8d870 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x301/0x8f0 net/core/rtnetlink.c:4765 #1: 00000000f71ef8cd (&qdisc_rx_lock){+...}, at: spin_lock_bh include/linux/spinlock.h:334 [inline] #1: 00000000f71ef8cd (&qdisc_rx_lock){+...}, at: sch_tree_lock include/net/sch_generic.h:476 [inline] #1: 00000000f71ef8cd (&qdisc_rx_lock){+...}, at: red_change+0x388/0x1790 net/sched/sch_red.c:230 Preemption disabled at: [] spin_lock_bh include/linux/spinlock.h:334 [inline] [] sch_tree_lock include/net/sch_generic.h:476 [inline] [] red_change+0x388/0x1790 net/sched/sch_red.c:230 CPU: 1 PID: 7051 Comm: syz-executor.4 Not tainted 4.19.94-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+0x123/0x177 lib/dump_stack.c:118 ___might_sleep.cold.88+0x1bb/0x1f4 kernel/sched/core.c:6192 __might_sleep+0x95/0x190 kernel/sched/core.c:6145 start_flush_work kernel/workqueue.c:2862 [inline] __flush_work+0xbd/0x7f0 kernel/workqueue.c:2925 __cancel_work_timer+0x2f1/0x430 kernel/workqueue.c:3013 cancel_work_sync+0xb/0x10 kernel/workqueue.c:3049 htb_destroy+0x20/0x4c0 net/sched/sch_htb.c:1241 qdisc_destroy+0x134/0x660 net/sched/sch_generic.c:982 red_change+0x6ee/0x1790 net/sched/sch_red.c:236 qdisc_change net/sched/sch_api.c:1239 [inline] tc_modify_qdisc+0xc2f/0x18f4 net/sched/sch_api.c:1542 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:4768 netlink_rcv_skb+0x142/0x390 net/netlink/af_netlink.c:2454 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4786 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x445/0x640 net/netlink/af_netlink.c:1343 netlink_sendmsg+0x765/0xc50 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:632 ___sys_sendmsg+0x647/0x950 net/socket.c:2115 __sys_sendmsg+0xd9/0x180 net/socket.c:2153 __do_sys_sendmsg net/socket.c:2162 [inline] __se_sys_sendmsg net/socket.c:2160 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2160 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459a59 Code: fd b7 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 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f7a781f4c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459a59 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000004 RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f7a781f56d4 R13: 00000000004c7c0c R14: 00000000004ddad8 R15: 00000000ffffffff 8021q: adding VLAN 0 to HW filter on device batadv0 IPv6: ADDRCONF(NETDEV_UP): veth1_to_team: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_team: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): team_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_UP): veth0_to_hsr: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth1_to_hsr: link is not ready hsr0: Slave A (hsr_slave_0) is not up; please bring it up to get a fully working HSR network hsr0: Slave B (hsr_slave_1) is not up; please bring it up to get a fully working HSR network IPv6: ADDRCONF(NETDEV_UP): hsr0: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_hsr: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): hsr_slave_0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_hsr: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): hsr_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): hsr0: link becomes ready IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready 8021q: adding VLAN 0 to HW filter on device batadv0 BUG: sleeping function called from invalid context at kernel/workqueue.c:2862 in_atomic(): 1, irqs_disabled(): 0, pid: 7144, name: syz-executor.0 2 locks held by syz-executor.0/7144: #0: 00000000dcf8d870 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline] #0: 00000000dcf8d870 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x301/0x8f0 net/core/rtnetlink.c:4765 #1: 00000000060ef11b (&qdisc_rx_lock){+...}, at: spin_lock_bh include/linux/spinlock.h:334 [inline] #1: 00000000060ef11b (&qdisc_rx_lock){+...}, at: sch_tree_lock include/net/sch_generic.h:476 [inline] #1: 00000000060ef11b (&qdisc_rx_lock){+...}, at: red_change+0x388/0x1790 net/sched/sch_red.c:230 Preemption disabled at: [] spin_lock_bh include/linux/spinlock.h:334 [inline] [] sch_tree_lock include/net/sch_generic.h:476 [inline] [] red_change+0x388/0x1790 net/sched/sch_red.c:230 CPU: 1 PID: 7144 Comm: syz-executor.0 Tainted: G W 4.19.94-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+0x123/0x177 lib/dump_stack.c:118 ___might_sleep.cold.88+0x1bb/0x1f4 kernel/sched/core.c:6192 __might_sleep+0x95/0x190 kernel/sched/core.c:6145 start_flush_work kernel/workqueue.c:2862 [inline] __flush_work+0xbd/0x7f0 kernel/workqueue.c:2925 __cancel_work_timer+0x2f1/0x430 kernel/workqueue.c:3013 cancel_work_sync+0xb/0x10 kernel/workqueue.c:3049 htb_destroy+0x20/0x4c0 net/sched/sch_htb.c:1241 qdisc_destroy+0x134/0x660 net/sched/sch_generic.c:982 red_change+0x6ee/0x1790 net/sched/sch_red.c:236 qdisc_change net/sched/sch_api.c:1239 [inline] tc_modify_qdisc+0xc2f/0x18f4 net/sched/sch_api.c:1542 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:4768 netlink_rcv_skb+0x142/0x390 net/netlink/af_netlink.c:2454 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4786 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x445/0x640 net/netlink/af_netlink.c:1343 netlink_sendmsg+0x765/0xc50 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:632 ___sys_sendmsg+0x647/0x950 net/socket.c:2115 __sys_sendmsg+0xd9/0x180 net/socket.c:2153 __do_sys_sendmsg net/socket.c:2162 [inline] __se_sys_sendmsg net/socket.c:2160 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2160 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459a59 Code: fd b7 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 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fad28a49c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459a59 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000004 RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fad28a4a6d4 R13: 00000000004c7c0c R14: 00000000004ddad8 R15: 00000000ffffffff BUG: sleeping function called from invalid context at kernel/workqueue.c:2862 in_atomic(): 1, irqs_disabled(): 0, pid: 7297, name: syz-executor.5 2 locks held by syz-executor.5/7297: #0: 00000000dcf8d870 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline] #0: 00000000dcf8d870 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x301/0x8f0 net/core/rtnetlink.c:4765 #1: 00000000459bbd59 (&qdisc_rx_lock){+...}, at: spin_lock_bh include/linux/spinlock.h:334 [inline] #1: 00000000459bbd59 (&qdisc_rx_lock){+...}, at: sch_tree_lock include/net/sch_generic.h:476 [inline] #1: 00000000459bbd59 (&qdisc_rx_lock){+...}, at: red_change+0x388/0x1790 net/sched/sch_red.c:230 Preemption disabled at: [] spin_lock_bh include/linux/spinlock.h:334 [inline] [] sch_tree_lock include/net/sch_generic.h:476 [inline] [] red_change+0x388/0x1790 net/sched/sch_red.c:230 CPU: 1 PID: 7297 Comm: syz-executor.5 Tainted: G W 4.19.94-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+0x123/0x177 lib/dump_stack.c:118 ___might_sleep.cold.88+0x1bb/0x1f4 kernel/sched/core.c:6192 __might_sleep+0x95/0x190 kernel/sched/core.c:6145 start_flush_work kernel/workqueue.c:2862 [inline] __flush_work+0xbd/0x7f0 kernel/workqueue.c:2925 __cancel_work_timer+0x2f1/0x430 kernel/workqueue.c:3013 cancel_work_sync+0xb/0x10 kernel/workqueue.c:3049 htb_destroy+0x20/0x4c0 net/sched/sch_htb.c:1241 qdisc_destroy+0x134/0x660 net/sched/sch_generic.c:982 red_change+0x6ee/0x1790 net/sched/sch_red.c:236 qdisc_change net/sched/sch_api.c:1239 [inline] tc_modify_qdisc+0xc2f/0x18f4 net/sched/sch_api.c:1542 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:4768 netlink_rcv_skb+0x142/0x390 net/netlink/af_netlink.c:2454 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4786 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x445/0x640 net/netlink/af_netlink.c:1343 netlink_sendmsg+0x765/0xc50 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:632 ___sys_sendmsg+0x647/0x950 net/socket.c:2115 __sys_sendmsg+0xd9/0x180 net/socket.c:2153 __do_sys_sendmsg net/socket.c:2162 [inline] __se_sys_sendmsg net/socket.c:2160 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2160 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459a59 Code: fd b7 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 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f56d325fc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459a59 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000004 RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f56d32606d4 R13: 00000000004c7c0c R14: 00000000004ddad8 R15: 00000000ffffffff BUG: sleeping function called from invalid context at kernel/workqueue.c:2862 in_atomic(): 1, irqs_disabled(): 0, pid: 7449, name: syz-executor.3 2 locks held by syz-executor.3/7449: #0: 00000000dcf8d870 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline] #0: 00000000dcf8d870 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x301/0x8f0 net/core/rtnetlink.c:4765 #1: 000000005af9f395 (&qdisc_rx_lock){+...}, at: spin_lock_bh include/linux/spinlock.h:334 [inline] #1: 000000005af9f395 (&qdisc_rx_lock){+...}, at: sch_tree_lock include/net/sch_generic.h:476 [inline] #1: 000000005af9f395 (&qdisc_rx_lock){+...}, at: red_change+0x388/0x1790 net/sched/sch_red.c:230 Preemption disabled at: [] spin_lock_bh include/linux/spinlock.h:334 [inline] [] sch_tree_lock include/net/sch_generic.h:476 [inline] [] red_change+0x388/0x1790 net/sched/sch_red.c:230 CPU: 1 PID: 7449 Comm: syz-executor.3 Tainted: G W 4.19.94-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+0x123/0x177 lib/dump_stack.c:118 ___might_sleep.cold.88+0x1bb/0x1f4 kernel/sched/core.c:6192 __might_sleep+0x95/0x190 kernel/sched/core.c:6145 start_flush_work kernel/workqueue.c:2862 [inline] __flush_work+0xbd/0x7f0 kernel/workqueue.c:2925 __cancel_work_timer+0x2f1/0x430 kernel/workqueue.c:3013 cancel_work_sync+0xb/0x10 kernel/workqueue.c:3049 htb_destroy+0x20/0x4c0 net/sched/sch_htb.c:1241 qdisc_destroy+0x134/0x660 net/sched/sch_generic.c:982 red_change+0x6ee/0x1790 net/sched/sch_red.c:236 qdisc_change net/sched/sch_api.c:1239 [inline] tc_modify_qdisc+0xc2f/0x18f4 net/sched/sch_api.c:1542 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:4768 netlink_rcv_skb+0x142/0x390 net/netlink/af_netlink.c:2454 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4786 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x445/0x640 net/netlink/af_netlink.c:1343 netlink_sendmsg+0x765/0xc50 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:632 ___sys_sendmsg+0x647/0x950 net/socket.c:2115 __sys_sendmsg+0xd9/0x180 net/socket.c:2153 __do_sys_sendmsg net/socket.c:2162 [inline] __se_sys_sendmsg net/socket.c:2160 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2160 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459a59 Code: fd b7 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 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fb86b44fc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459a59 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000004 RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb86b4506d4 R13: 00000000004c7c0c R14: 00000000004ddad8 R15: 00000000ffffffff