BUG: sleeping function called from invalid context at net/core/sock.c:3910 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 6857, name: syz.1.264 preempt_count: 200, expected: 0 RCU nest depth: 2, expected: 0 locks held by syz.1.264/6857: 3, last CPU#1: #0: ffffffff8ffeb4e0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline] #0: ffffffff8ffeb4e0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #0: ffffffff8ffeb4e0 (rcu_read_lock){....}-{1:3}, at: tun_get_user+0xf8b/0x3ee0 drivers/net/tun.c:1994 #1: ffffffff8ffeb4e0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline] #1: ffffffff8ffeb4e0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #1: ffffffff8ffeb4e0 (rcu_read_lock){....}-{1:3}, at: netif_receive_skb_internal net/core/dev.c:6591 [inline] #1: ffffffff8ffeb4e0 (rcu_read_lock){....}-{1:3}, at: netif_receive_skb+0xf8/0x7d0 net/core/dev.c:6663 #2: ffff88805cbb6260 (sk_lock-AF_X25){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1717 [inline] #2: ffff88805cbb6260 (sk_lock-AF_X25){+.+.}-{0:0}, at: x25_kill_by_neigh+0x168/0x280 net/x25/af_x25.c:1775 Preemption disabled at: [] local_bh_disable include/linux/bottom_half.h:20 [inline] [] tun_rx_batched.isra.0+0x46b/0x750 drivers/net/tun.c:1573 CPU: 1 UID: 0 PID: 6857 Comm: syz.1.264 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 __might_resched.cold+0x1dc/0x222 kernel/sched/core.c:9195 lock_sock_nested+0x52/0xf0 net/core/sock.c:3910 lock_sock include/net/sock.h:1717 [inline] x25_kill_by_neigh+0x168/0x280 net/x25/af_x25.c:1775 x25_lapb_receive_frame+0x4b1/0x1000 net/x25/x25_dev.c:138 __netif_receive_skb_one_core+0x1b2/0x1e0 net/core/dev.c:6405 __netif_receive_skb+0x1f/0x120 net/core/dev.c:6518 netif_receive_skb_internal net/core/dev.c:6604 [inline] netif_receive_skb+0x139/0x7d0 net/core/dev.c:6663 tun_rx_batched.isra.0+0x3f6/0x750 drivers/net/tun.c:1599 tun_get_user+0x1f62/0x3ee0 drivers/net/tun.c:2053 tun_chr_write_iter+0xdc/0x200 drivers/net/tun.c:2100 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x6af/0x1050 fs/read_write.c:687 ksys_write+0x12a/0x250 fs/read_write.c:739 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f9f62f9f559 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f9f63ebd028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f9f63225fa0 RCX: 00007f9f62f9f559 RDX: 000000000000000a RSI: 0000200000000040 RDI: 0000000000000003 RBP: 00007f9f63036b20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f9f63226038 R14: 00007f9f63225fa0 R15: 00007fffd50fb9d8