------------[ cut here ]------------ refcount_t: decrement hit 0; leaking memory. WARNING: CPU: 2 PID: 4777 at lib/refcount.c:31 refcount_warn_saturate+0xbf/0x1e0 lib/refcount.c:31 Modules linked in: CPU: 3 PID: 4777 Comm: syz-executor.1 Not tainted 5.16.0-rc2-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 RIP: 0010:refcount_warn_saturate+0xbf/0x1e0 lib/refcount.c:31 Code: 1d d4 da a1 09 31 ff 89 de e8 dd 4a 9c fd 84 db 75 e0 e8 f4 46 9c fd 48 c7 c7 e0 4c 04 8a c6 05 b4 da a1 09 01 e8 e5 ae 25 05 <0f> 0b eb c4 e8 d8 46 9c fd 0f b6 1d a3 da a1 09 31 ff 89 de e8 a8 RSP: 0018:ffffc90002a7fcc0 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff888073202180 RSI: ffffffff815e40a8 RDI: fffff5200054ff8a RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff815dde4e R11: 0000000000000000 R12: ffff88804abe85b0 R13: ffffffff8d30cae0 R14: ffff88804abe85c0 R15: ffffffff8d30cae0 FS: 00005555567be400(0000) GS:ffff88802cd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffde6915e88 CR3: 00000000728eb000 CR4: 0000000000150ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __refcount_dec include/linux/refcount.h:344 [inline] refcount_dec include/linux/refcount.h:359 [inline] dev_put include/linux/netdevice.h:4166 [inline] linkwatch_do_dev+0x134/0x150 net/core/link_watch.c:169 linkwatch_forget_dev+0x16a/0x200 net/core/link_watch.c:238 netdev_wait_allrefs net/core/dev.c:10498 [inline] netdev_run_todo+0x402/0xa80 net/core/dev.c:10615 tun_detach drivers/net/tun.c:690 [inline] tun_chr_close+0xe0/0x180 drivers/net/tun.c:3402 __fput+0x286/0x9f0 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f588541f72b Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44 RSP: 002b:00007fffcc087850 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f588541f72b RDX: 0000000000000000 RSI: ffffffff815e32c2 RDI: 0000000000000003 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000001b33b24eb0 R10: 00000000000004d7 R11: 0000000000000293 R12: 00007f5885580b60 R13: 00007f5885580b60 R14: 00007f588557ff60 R15: 0000000000042414