[v6.1] possible deadlock in wg_socket_clear_peer_endpoint_src

1 view
Skip to first unread message

syzbot

unread,
Jul 12, 2023, 8:04:17 PM7/12/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 61fd484b2cf6 Linux 6.1.38
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=156409b4a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=6f0f33ddb500fad0
dashboard link: https://syzkaller.appspot.com/bug?extid=7460f7aacf78cbe044a1
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/898eff1fdc20/disk-61fd484b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c5a649af018f/vmlinux-61fd484b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/30a2cee1f58d/Image-61fd484b.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+7460f7...@syzkaller.appspotmail.com

netlink: 20 bytes leftover after parsing attributes in process `syz-executor.2'.
=====================================================
WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected
6.1.38-syzkaller #0 Not tainted
-----------------------------------------------------
syz-executor.2/10294 [HC0[0]:SC0[2]:HE1:SE0] is trying to acquire:
ffff80001586bd40 (fs_reclaim){+.+.}-{0:0}, at: might_alloc include/linux/sched/mm.h:271 [inline]
ffff80001586bd40 (fs_reclaim){+.+.}-{0:0}, at: slab_pre_alloc_hook mm/slab.h:710 [inline]
ffff80001586bd40 (fs_reclaim){+.+.}-{0:0}, at: slab_alloc_node mm/slub.c:3318 [inline]
ffff80001586bd40 (fs_reclaim){+.+.}-{0:0}, at: __kmem_cache_alloc_node+0x58/0x388 mm/slub.c:3437

and this task is already holding:
ffff0000cdfef108 (&sch->q.lock){+...}-{2:2}, at: sch_tree_lock+0x120/0x1d4
which would create a new lock dependency:
(&sch->q.lock){+...}-{2:2} -> (fs_reclaim){+.+.}-{0:0}

but this new dependency connects a SOFTIRQ-irq-safe lock:
(&peer->endpoint_lock){++-.}-{2:2}

... which became SOFTIRQ-irq-safe at:
lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669
__raw_write_lock_bh include/linux/rwlock_api_smp.h:202 [inline]
_raw_write_lock_bh+0x54/0x6c kernel/locking/spinlock.c:334
wg_socket_clear_peer_endpoint_src+0x24/0x54 drivers/net/wireguard/socket.c:310
wg_expired_retransmit_handshake+0xc4/0x27c drivers/net/wireguard/timers.c:73
call_timer_fn+0x1c0/0xa1c kernel/time/timer.c:1474
expire_timers kernel/time/timer.c:1519 [inline]
__run_timers+0x554/0x718 kernel/time/timer.c:1790
run_timer_softirq+0x7c/0x114 kernel/time/timer.c:1803
__do_softirq+0x30c/0xea0 kernel/softirq.c:571
____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:79
call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:889
do_softirq_own_stack+0x20/0x2c arch/arm64/kernel/irq.c:84
invoke_softirq kernel/softirq.c:452 [inline]
__irq_exit_rcu+0x28c/0x534 kernel/softirq.c:650
irq_exit_rcu+0x14/0x84 kernel/softirq.c:662
__el1_irq arch/arm64/kernel/entry-common.c:472 [inline]
el1_interrupt+0x38/0x68 arch/arm64/kernel/entry-common.c:486
el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:491
el1h_64_irq+0x64/0x68 arch/arm64/kernel/entry.S:577
__sanitizer_cov_trace_switch+0x1c/0xec kernel/kcov.c:323
vsnprintf+0x128/0x1998 lib/vsprintf.c:2752
add_uevent_var+0x190/0x3c0 lib/kobject_uevent.c:665
dev_uevent+0x164/0x790 drivers/base/core.c:2550
uevent_show+0x1a4/0x320 drivers/base/core.c:2639
dev_attr_show+0x60/0xcc drivers/base/core.c:2342
sysfs_kf_seq_show+0x2d0/0x43c fs/sysfs/file.c:59
kernfs_seq_show+0x150/0x1fc fs/kernfs/file.c:201
seq_read_iter+0x3e0/0xc44 fs/seq_file.c:230
kernfs_fop_read_iter+0x144/0x5c8 fs/kernfs/file.c:275
call_read_iter include/linux/fs.h:2199 [inline]
new_sync_read fs/read_write.c:389 [inline]
vfs_read+0x5bc/0x8ac fs/read_write.c:470
ksys_read+0x15c/0x26c fs/read_write.c:613
__do_sys_read fs/read_write.c:623 [inline]
__se_sys_read fs/read_write.c:621 [inline]
__arm64_sys_read+0x7c/0x90 fs/read_write.c:621
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581

to a SOFTIRQ-irq-unsafe lock:
(fs_reclaim){+.+.}-{0:0}

... which became SOFTIRQ-irq-unsafe at:
...
lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669
__fs_reclaim_acquire mm/page_alloc.c:4683 [inline]
fs_reclaim_acquire+0x90/0x12c mm/page_alloc.c:4697
might_alloc include/linux/sched/mm.h:271 [inline]
slab_pre_alloc_hook mm/slab.h:710 [inline]
slab_alloc_node mm/slub.c:3318 [inline]
__kmem_cache_alloc_node+0x58/0x388 mm/slub.c:3437
kmalloc_node_trace+0x44/0x90 mm/slab_common.c:1058
kmalloc_node include/linux/slab.h:575 [inline]
kzalloc_node include/linux/slab.h:700 [inline]
alloc_worker kernel/workqueue.c:1840 [inline]
init_rescuer+0xa4/0x264 kernel/workqueue.c:4269
workqueue_init+0x298/0x5b4 kernel/workqueue.c:6098
kernel_init_freeable+0x33c/0x528 init/main.c:1614
kernel_init+0x24/0x29c init/main.c:1519
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860

other info that might help us debug this:

Chain exists of:
&peer->endpoint_lock --> &sch->q.lock --> fs_reclaim

Possible interrupt unsafe locking scenario:

CPU0 CPU1
---- ----
lock(fs_reclaim);
local_irq_disable();
lock(&peer->endpoint_lock);
lock(&sch->q.lock);
<Interrupt>
lock(&peer->endpoint_lock);

*** DEADLOCK ***

2 locks held by syz-executor.2/10294:
#0: ffff800017b9e948 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:74 [inline]
#0: ffff800017b9e948 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x6e8/0xd94 net/core/rtnetlink.c:6094
#1: ffff0000cdfef108 (&sch->q.lock){+...}-{2:2}, at: sch_tree_lock+0x120/0x1d4

the dependencies between SOFTIRQ-irq-safe lock and the holding lock:
-> (&peer->endpoint_lock){++-.}-{2:2} {
HARDIRQ-ON-W at:
lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669
__raw_write_lock_bh include/linux/rwlock_api_smp.h:202 [inline]
_raw_write_lock_bh+0x54/0x6c kernel/locking/spinlock.c:334
wg_socket_set_peer_endpoint+0x3fc/0x76c drivers/net/wireguard/socket.c:283
wg_set_device+0xed0/0x1aa4 drivers/net/wireguard/netlink.c:588
genl_family_rcv_msg_doit net/netlink/genetlink.c:756 [inline]
genl_family_rcv_msg net/netlink/genetlink.c:833 [inline]
genl_rcv_msg+0x948/0xc2c net/netlink/genetlink.c:850
netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2524
genl_rcv+0x38/0x50 net/netlink/genetlink.c:861
netlink_unicast_kernel net/netlink/af_netlink.c:1328 [inline]
netlink_unicast+0x660/0x8d4 net/netlink/af_netlink.c:1354
netlink_sendmsg+0x834/0xb18 net/netlink/af_netlink.c:1902
sock_sendmsg_nosec net/socket.c:716 [inline]
sock_sendmsg net/socket.c:736 [inline]
__sys_sendto+0x3b4/0x504 net/socket.c:2117
__do_sys_sendto net/socket.c:2129 [inline]
__se_sys_sendto net/socket.c:2125 [inline]
__arm64_sys_sendto+0xd8/0xf8 net/socket.c:2125
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
HARDIRQ-ON-R at:
lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669
__raw_read_lock_bh include/linux/rwlock_api_smp.h:176 [inline]
_raw_read_lock_bh+0x60/0x78 kernel/locking/spinlock.c:252
wg_socket_send_skb_to_peer+0x64/0x1a8 drivers/net/wireguard/socket.c:173
wg_socket_send_buffer_to_peer+0xec/0x144 drivers/net/wireguard/socket.c:200
wg_packet_send_handshake_initiation drivers/net/wireguard/send.c:40 [inline]
wg_packet_handshake_send_worker+0x1a8/0x2a4 drivers/net/wireguard/send.c:51
process_one_work+0x7ac/0x1404 kernel/workqueue.c:2289
worker_thread+0x8e4/0xfec kernel/workqueue.c:2436
kthread+0x250/0x2d8 kernel/kthread.c:376
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860
IN-SOFTIRQ-W at:
lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669
__raw_write_lock_bh include/linux/rwlock_api_smp.h:202 [inline]
_raw_write_lock_bh+0x54/0x6c kernel/locking/spinlock.c:334
wg_socket_clear_peer_endpoint_src+0x24/0x54 drivers/net/wireguard/socket.c:310
wg_expired_retransmit_handshake+0xc4/0x27c drivers/net/wireguard/timers.c:73
call_timer_fn+0x1c0/0xa1c kernel/time/timer.c:1474
expire_timers kernel/time/timer.c:1519 [inline]
__run_timers+0x554/0x718 kernel/time/timer.c:1790
run_timer_softirq+0x7c/0x114 kernel/time/timer.c:1803
__do_softirq+0x30c/0xea0 kernel/softirq.c:571
____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:79
call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:889
do_softirq_own_stack+0x20/0x2c arch/arm64/kernel/irq.c:84
invoke_softirq kernel/softirq.c:452 [inline]
__irq_exit_rcu+0x28c/0x534 kernel/softirq.c:650
irq_exit_rcu+0x14/0x84 kernel/softirq.c:662
__el1_irq arch/arm64/kernel/entry-common.c:472 [inline]
el1_interrupt+0x38/0x68 arch/arm64/kernel/entry-common.c:486
el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:491
el1h_64_irq+0x64/0x68 arch/arm64/kernel/entry.S:577
__sanitizer_cov_trace_switch+0x1c/0xec kernel/kcov.c:323
vsnprintf+0x128/0x1998 lib/vsprintf.c:2752
add_uevent_var+0x190/0x3c0 lib/kobject_uevent.c:665
dev_uevent+0x164/0x790 drivers/base/core.c:2550
uevent_show+0x1a4/0x320 drivers/base/core.c:2639
dev_attr_show+0x60/0xcc drivers/base/core.c:2342
sysfs_kf_seq_show+0x2d0/0x43c fs/sysfs/file.c:59
kernfs_seq_show+0x150/0x1fc fs/kernfs/file.c:201
seq_read_iter+0x3e0/0xc44 fs/seq_file.c:230
kernfs_fop_read_iter+0x144/0x5c8 fs/kernfs/file.c:275
call_read_iter include/linux/fs.h:2199 [inline]
new_sync_read fs/read_write.c:389 [inline]
vfs_read+0x5bc/0x8ac fs/read_write.c:470
ksys_read+0x15c/0x26c fs/read_write.c:613
__do_sys_read fs/read_write.c:623 [inline]
__se_sys_read fs/read_write.c:621 [inline]
__arm64_sys_read+0x7c/0x90 fs/read_write.c:621
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
INITIAL USE at:
lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669
__raw_write_lock_bh include/linux/rwlock_api_smp.h:202 [inline]
_raw_write_lock_bh+0x54/0x6c kernel/locking/spinlock.c:334
wg_socket_set_peer_endpoint+0x3fc/0x76c drivers/net/wireguard/socket.c:283
wg_set_device+0xed0/0x1aa4 drivers/net/wireguard/netlink.c:588
genl_family_rcv_msg_doit net/netlink/genetlink.c:756 [inline]
genl_family_rcv_msg net/netlink/genetlink.c:833 [inline]
genl_rcv_msg+0x948/0xc2c net/netlink/genetlink.c:850
netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2524
genl_rcv+0x38/0x50 net/netlink/genetlink.c:861
netlink_unicast_kernel net/netlink/af_netlink.c:1328 [inline]
netlink_unicast+0x660/0x8d4 net/netlink/af_netlink.c:1354
netlink_sendmsg+0x834/0xb18 net/netlink/af_netlink.c:1902
sock_sendmsg_nosec net/socket.c:716 [inline]
sock_sendmsg net/socket.c:736 [inline]
__sys_sendto+0x3b4/0x504 net/socket.c:2117
__do_sys_sendto net/socket.c:2129 [inline]
__se_sys_sendto net/socket.c:2125 [inline]
__arm64_sys_sendto+0xd8/0xf8 net/socket.c:2125
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
INITIAL READ USE at:
lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669
__raw_read_lock_bh include/linux/rwlock_api_smp.h:176 [inline]
_raw_read_lock_bh+0x60/0x78 kernel/locking/spinlock.c:252
wg_socket_send_skb_to_peer+0x64/0x1a8 drivers/net/wireguard/socket.c:173
wg_socket_send_buffer_to_peer+0xec/0x144 drivers/net/wireguard/socket.c:200
wg_packet_send_handshake_initiation drivers/net/wireguard/send.c:40 [inline]
wg_packet_handshake_send_worker+0x1a8/0x2a4 drivers/net/wireguard/send.c:51
process_one_work+0x7ac/0x1404 kernel/workqueue.c:2289
worker_thread+0x8e4/0xfec kernel/workqueue.c:2436
kthread+0x250/0x2d8 kernel/kthread.c:376
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860
}
... key at: [<ffff8000199c7080>] wg_peer_create.__key.5+0x0/0x20
-> (&sch->q.lock){+...}-{2:2} {
HARDIRQ-ON-W at:
lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
_raw_spin_lock_bh+0x54/0x6c kernel/locking/spinlock.c:178
spin_lock_bh include/linux/spinlock.h:355 [inline]
dev_reset_queue+0x130/0x1fc net/sched/sch_generic.c:1291
netdev_for_each_tx_queue include/linux/netdevice.h:2453 [inline]
dev_deactivate_many+0x540/0xa8c net/sched/sch_generic.c:1359
dev_deactivate+0x13c/0x1fc net/sched/sch_generic.c:1382
linkwatch_do_dev+0x29c/0x3a4 net/core/link_watch.c:166
__linkwatch_run_queue+0x3a0/0x700 net/core/link_watch.c:221
linkwatch_event+0x58/0x68 net/core/link_watch.c:264
process_one_work+0x7ac/0x1404 kernel/workqueue.c:2289
worker_thread+0x8e4/0xfec kernel/workqueue.c:2436
kthread+0x250/0x2d8 kernel/kthread.c:376
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860
INITIAL USE at:
lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
_raw_spin_lock_bh+0x54/0x6c kernel/locking/spinlock.c:178
spin_lock_bh include/linux/spinlock.h:355 [inline]
dev_reset_queue+0x130/0x1fc net/sched/sch_generic.c:1291
netdev_for_each_tx_queue include/linux/netdevice.h:2453 [inline]
dev_deactivate_many+0x540/0xa8c net/sched/sch_generic.c:1359
dev_deactivate+0x13c/0x1fc net/sched/sch_generic.c:1382
linkwatch_do_dev+0x29c/0x3a4 net/core/link_watch.c:166
__linkwatch_run_queue+0x3a0/0x700 net/core/link_watch.c:221
linkwatch_event+0x58/0x68 net/core/link_watch.c:264
process_one_work+0x7ac/0x1404 kernel/workqueue.c:2289
worker_thread+0x8e4/0xfec kernel/workqueue.c:2436
kthread+0x250/0x2d8 kernel/kthread.c:376
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860
}
... key at: [<ffff800019a4eae0>] qdisc_alloc.__key+0x0/0x20
... acquired at:
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x54/0x6c kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:350 [inline]
__dev_xmit_skb net/core/dev.c:3854 [inline]
__dev_queue_xmit+0xb14/0x38d8 net/core/dev.c:4227
dev_queue_xmit include/linux/netdevice.h:3021 [inline]
neigh_hh_output include/net/neighbour.h:528 [inline]
neigh_output include/net/neighbour.h:542 [inline]
ip6_finish_output2+0xd80/0x1a98 net/ipv6/ip6_output.c:134
__ip6_finish_output net/ipv6/ip6_output.c:195 [inline]
ip6_finish_output+0x538/0x8c8 net/ipv6/ip6_output.c:206
NF_HOOK_COND include/linux/netfilter.h:291 [inline]
ip6_output+0x270/0x594 net/ipv6/ip6_output.c:227
dst_output include/net/dst.h:444 [inline]
ip6_local_out+0x120/0x160 net/ipv6/output_core.c:161
ip6tunnel_xmit include/net/ip6_tunnel.h:161 [inline]
udp_tunnel6_xmit_skb+0x48c/0x930 net/ipv6/ip6_udp_tunnel.c:109
send6+0x558/0x924 drivers/net/wireguard/socket.c:152
wg_socket_send_skb_to_peer+0xfc/0x1a8 drivers/net/wireguard/socket.c:178
wg_packet_create_data_done drivers/net/wireguard/send.c:251 [inline]
wg_packet_tx_worker+0x1a8/0x718 drivers/net/wireguard/send.c:276
process_one_work+0x7ac/0x1404 kernel/workqueue.c:2289
worker_thread+0x8e4/0xfec kernel/workqueue.c:2436
kthread+0x250/0x2d8 kernel/kthread.c:376
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860


the dependencies between the lock to be acquired
and SOFTIRQ-irq-unsafe lock:
-> (fs_reclaim){+.+.}-{0:0} {
HARDIRQ-ON-W at:
lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669
__fs_reclaim_acquire mm/page_alloc.c:4683 [inline]
fs_reclaim_acquire+0x90/0x12c mm/page_alloc.c:4697
might_alloc include/linux/sched/mm.h:271 [inline]
slab_pre_alloc_hook mm/slab.h:710 [inline]
slab_alloc_node mm/slub.c:3318 [inline]
__kmem_cache_alloc_node+0x58/0x388 mm/slub.c:3437
kmalloc_node_trace+0x44/0x90 mm/slab_common.c:1058
kmalloc_node include/linux/slab.h:575 [inline]
kzalloc_node include/linux/slab.h:700 [inline]
alloc_worker kernel/workqueue.c:1840 [inline]
init_rescuer+0xa4/0x264 kernel/workqueue.c:4269
workqueue_init+0x298/0x5b4 kernel/workqueue.c:6098
kernel_init_freeable+0x33c/0x528 init/main.c:1614
kernel_init+0x24/0x29c init/main.c:1519
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860
SOFTIRQ-ON-W at:
lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669
__fs_reclaim_acquire mm/page_alloc.c:4683 [inline]
fs_reclaim_acquire+0x90/0x12c mm/page_alloc.c:4697
might_alloc include/linux/sched/mm.h:271 [inline]
slab_pre_alloc_hook mm/slab.h:710 [inline]
slab_alloc_node mm/slub.c:3318 [inline]
__kmem_cache_alloc_node+0x58/0x388 mm/slub.c:3437
kmalloc_node_trace+0x44/0x90 mm/slab_common.c:1058
kmalloc_node include/linux/slab.h:575 [inline]
kzalloc_node include/linux/slab.h:700 [inline]
alloc_worker kernel/workqueue.c:1840 [inline]
init_rescuer+0xa4/0x264 kernel/workqueue.c:4269
workqueue_init+0x298/0x5b4 kernel/workqueue.c:6098
kernel_init_freeable+0x33c/0x528 init/main.c:1614
kernel_init+0x24/0x29c init/main.c:1519
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860
INITIAL USE at:
lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669
__fs_reclaim_acquire mm/page_alloc.c:4683 [inline]
fs_reclaim_acquire+0x90/0x12c mm/page_alloc.c:4697
might_alloc include/linux/sched/mm.h:271 [inline]
slab_pre_alloc_hook mm/slab.h:710 [inline]
slab_alloc_node mm/slub.c:3318 [inline]
__kmem_cache_alloc_node+0x58/0x388 mm/slub.c:3437
kmalloc_node_trace+0x44/0x90 mm/slab_common.c:1058
kmalloc_node include/linux/slab.h:575 [inline]
kzalloc_node include/linux/slab.h:700 [inline]
alloc_worker kernel/workqueue.c:1840 [inline]
init_rescuer+0xa4/0x264 kernel/workqueue.c:4269
workqueue_init+0x298/0x5b4 kernel/workqueue.c:6098
kernel_init_freeable+0x33c/0x528 init/main.c:1614
kernel_init+0x24/0x29c init/main.c:1519
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860
}
... key at: [<ffff80001586bd40>] __fs_reclaim_map+0x0/0xe0
... acquired at:
__fs_reclaim_acquire mm/page_alloc.c:4683 [inline]
fs_reclaim_acquire+0x90/0x12c mm/page_alloc.c:4697
might_alloc include/linux/sched/mm.h:271 [inline]
slab_pre_alloc_hook mm/slab.h:710 [inline]
slab_alloc_node mm/slub.c:3318 [inline]
__kmem_cache_alloc_node+0x58/0x388 mm/slub.c:3437
__do_kmalloc_node mm/slab_common.c:954 [inline]
__kmalloc_node+0xcc/0x1d0 mm/slab_common.c:962
kmalloc_node include/linux/slab.h:579 [inline]
kvmalloc_node+0x84/0x1e4 mm/util.c:581
kvmalloc include/linux/slab.h:706 [inline]
get_dist_table+0xa0/0x354 net/sched/sch_netem.c:788
netem_change+0x754/0x1900 net/sched/sch_netem.c:985
netem_init+0x54/0xb8 net/sched/sch_netem.c:1072
qdisc_create+0x70c/0xe64 net/sched/sch_api.c:1314
tc_modify_qdisc+0x9f0/0x1840
rtnetlink_rcv_msg+0x72c/0xd94 net/core/rtnetlink.c:6097
netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2524
rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6115
netlink_unicast_kernel net/netlink/af_netlink.c:1328 [inline]
netlink_unicast+0x660/0x8d4 net/netlink/af_netlink.c:1354
netlink_sendmsg+0x834/0xb18 net/netlink/af_netlink.c:1902
sock_sendmsg_nosec net/socket.c:716 [inline]
sock_sendmsg net/socket.c:736 [inline]
____sys_sendmsg+0x558/0x844 net/socket.c:2482
___sys_sendmsg net/socket.c:2536 [inline]
__sys_sendmsg+0x26c/0x33c net/socket.c:2565
__do_sys_sendmsg net/socket.c:2574 [inline]
__se_sys_sendmsg net/socket.c:2572 [inline]
__arm64_sys_sendmsg+0x80/0x94 net/socket.c:2572
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581


stack backtrace:
CPU: 1 PID: 10294 Comm: syz-executor.2 Not tainted 6.1.38-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x5c lib/dump_stack.c:113
__lock_acquire+0x6310/0x764c kernel/locking/lockdep.c:5056
lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669
__fs_reclaim_acquire mm/page_alloc.c:4683 [inline]
fs_reclaim_acquire+0x90/0x12c mm/page_alloc.c:4697
might_alloc include/linux/sched/mm.h:271 [inline]
slab_pre_alloc_hook mm/slab.h:710 [inline]
slab_alloc_node mm/slub.c:3318 [inline]
__kmem_cache_alloc_node+0x58/0x388 mm/slub.c:3437
__do_kmalloc_node mm/slab_common.c:954 [inline]
__kmalloc_node+0xcc/0x1d0 mm/slab_common.c:962
kmalloc_node include/linux/slab.h:579 [inline]
kvmalloc_node+0x84/0x1e4 mm/util.c:581
kvmalloc include/linux/slab.h:706 [inline]
get_dist_table+0xa0/0x354 net/sched/sch_netem.c:788
netem_change+0x754/0x1900 net/sched/sch_netem.c:985
netem_init+0x54/0xb8 net/sched/sch_netem.c:1072
qdisc_create+0x70c/0xe64 net/sched/sch_api.c:1314
tc_modify_qdisc+0x9f0/0x1840
rtnetlink_rcv_msg+0x72c/0xd94 net/core/rtnetlink.c:6097
netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2524
rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6115
netlink_unicast_kernel net/netlink/af_netlink.c:1328 [inline]
netlink_unicast+0x660/0x8d4 net/netlink/af_netlink.c:1354
netlink_sendmsg+0x834/0xb18 net/netlink/af_netlink.c:1902
sock_sendmsg_nosec net/socket.c:716 [inline]
sock_sendmsg net/socket.c:736 [inline]
____sys_sendmsg+0x558/0x844 net/socket.c:2482
___sys_sendmsg net/socket.c:2536 [inline]
__sys_sendmsg+0x26c/0x33c net/socket.c:2565
__do_sys_sendmsg net/socket.c:2574 [inline]
__se_sys_sendmsg net/socket.c:2572 [inline]
__arm64_sys_sendmsg+0x80/0x94 net/socket.c:2572
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
BUG: sleeping function called from invalid context at include/linux/sched/mm.h:274
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 10294, name: syz-executor.2
preempt_count: 201, expected: 0
RCU nest depth: 0, expected: 0
INFO: lockdep is turned off.
Preemption disabled at:
[<ffff8000106c0d88>] sch_tree_lock+0x120/0x1d4
CPU: 1 PID: 10294 Comm: syz-executor.2 Not tainted 6.1.38-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x5c lib/dump_stack.c:113
__might_resched+0x37c/0x4d8 kernel/sched/core.c:9941
__might_sleep+0x90/0xe4 kernel/sched/core.c:9870
might_alloc include/linux/sched/mm.h:274 [inline]
slab_pre_alloc_hook mm/slab.h:710 [inline]
slab_alloc_node mm/slub.c:3318 [inline]
__kmem_cache_alloc_node+0x74/0x388 mm/slub.c:3437
__do_kmalloc_node mm/slab_common.c:954 [inline]
__kmalloc_node+0xcc/0x1d0 mm/slab_common.c:962
kmalloc_node include/linux/slab.h:579 [inline]
kvmalloc_node+0x84/0x1e4 mm/util.c:581
kvmalloc include/linux/slab.h:706 [inline]
get_dist_table+0xa0/0x354 net/sched/sch_netem.c:788
netem_change+0x754/0x1900 net/sched/sch_netem.c:985
netem_init+0x54/0xb8 net/sched/sch_netem.c:1072
qdisc_create+0x70c/0xe64 net/sched/sch_api.c:1314
tc_modify_qdisc+0x9f0/0x1840
rtnetlink_rcv_msg+0x72c/0xd94 net/core/rtnetlink.c:6097
netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2524
rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6115
netlink_unicast_kernel net/netlink/af_netlink.c:1328 [inline]
netlink_unicast+0x660/0x8d4 net/netlink/af_netlink.c:1354
netlink_sendmsg+0x834/0xb18 net/netlink/af_netlink.c:1902
sock_sendmsg_nosec net/socket.c:716 [inline]
sock_sendmsg net/socket.c:736 [inline]
____sys_sendmsg+0x558/0x844 net/socket.c:2482
___sys_sendmsg net/socket.c:2536 [inline]
__sys_sendmsg+0x26c/0x33c net/socket.c:2565
__do_sys_sendmsg net/socket.c:2574 [inline]
__se_sys_sendmsg net/socket.c:2572 [inline]
__arm64_sys_sendmsg+0x80/0x94 net/socket.c:2572
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Oct 20, 2023, 8:03:45 PM10/20/23
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages