BUG: sleeping function called from invalid context at net/core/sock.c:3908 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 6236, name: syz.2.104 preempt_count: 200, expected: 0 RCU nest depth: 2, expected: 0 locks held by syz.2.104/6236: 3, on CPU#1: #0: ffffffff8ffed020 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline] #0: ffffffff8ffed020 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #0: ffffffff8ffed020 (rcu_read_lock){....}-{1:3}, at: tun_get_user+0xf8b/0x3ee0 drivers/net/tun.c:1998 #1: ffffffff8ffed020 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline] #1: ffffffff8ffed020 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #1: ffffffff8ffed020 (rcu_read_lock){....}-{1:3}, at: netif_receive_skb_internal net/core/dev.c:6621 [inline] #1: ffffffff8ffed020 (rcu_read_lock){....}-{1:3}, at: netif_receive_skb+0xf8/0x7d0 net/core/dev.c:6693 #2: ffff888030ec4260 (sk_lock-AF_X25){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1717 [inline] #2: ffff888030ec4260 (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:1577 CPU: 1 UID: 0 PID: 6236 Comm: syz.2.104 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:9202 lock_sock_nested+0x52/0xf0 net/core/sock.c:3908 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:6435 __netif_receive_skb+0x1f/0x120 net/core/dev.c:6548 netif_receive_skb_internal net/core/dev.c:6634 [inline] netif_receive_skb+0x139/0x7d0 net/core/dev.c:6693 tun_rx_batched.isra.0+0x3f6/0x750 drivers/net/tun.c:1603 tun_get_user+0x1f62/0x3ee0 drivers/net/tun.c:2057 tun_chr_write_iter+0xdc/0x200 drivers/net/tun.c:2104 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x6af/0x1040 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/0x7b0 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fba7c79fb19 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:00007fba7d73c028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fba7ca25fa0 RCX: 00007fba7c79fb19 RDX: 000000000000000a RSI: 0000200000000600 RDI: 0000000000000004 RBP: 00007fba7c837b70 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fba7ca26038 R14: 00007fba7ca25fa0 R15: 00007ffc36420348 e1000e 0000:00:02.0 eth1: removed PHC e1000e 0000:00:02.0 eth1: NIC Link is Down