syzbot


WARNING: refcount bug in nsim_destroy
Status: auto-closed as invalid on 2022/03/18 15:39
Reported-by: syzbot+0d65c9e2e3bcb8873be4@syzkaller.appspotmail.com
First crash: 191d, last: 187d

Sample crash report:
netdevsim netdevsim2 netdevsim1 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
------------[ cut here ]------------
refcount_t: decrement hit 0; leaking memory.
WARNING: CPU: 0 PID: 10 at lib/refcount.c:31 refcount_warn_saturate+0xbf/0x1e0 lib/refcount.c:31
Modules linked in:
CPU: 1 PID: 10 Comm: kworker/u4:1 Not tainted 5.16.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: netns cleanup_net
RIP: 0010:refcount_warn_saturate+0xbf/0x1e0 lib/refcount.c:31
Code: 1d 96 e5 a1 09 31 ff 89 de e8 5d 52 9c fd 84 db 75 e0 e8 74 4e 9c fd 48 c7 c7 60 4a 04 8a c6 05 76 e5 a1 09 01 e8 e5 07 33 05 <0f> 0b eb c4 e8 58 4e 9c fd 0f b6 1d 65 e5 a1 09 31 ff 89 de e8 28
RSP: 0018:ffffc90000f0f848 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff888011c7e280 RSI: ffffffff815e8f28 RDI: fffff520001e1efb
RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff815e2cfe R11: 0000000000000000 R12: 0000000000000001
R13: ffffc90000f0f990 R14: ffff88803c0445b0 R15: ffff88807ed16e00
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe270db91b8 CR3: 00000000765f4000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __refcount_dec include/linux/refcount.h:344 [inline]
 refcount_dec include/linux/refcount.h:359 [inline]
 dev_put include/linux/netdevice.h:4166 [inline]
 unregister_netdevice_many+0x12c9/0x1790 net/core/dev.c:11114
 unregister_netdevice_queue+0x2dd/0x3c0 net/core/dev.c:11011
 unregister_netdevice include/linux/netdevice.h:2989 [inline]
 nsim_destroy+0x3f/0x190 drivers/net/netdevsim/netdev.c:382
 __nsim_dev_port_del+0x191/0x250 drivers/net/netdevsim/dev.c:1429
 nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1442 [inline]
 nsim_dev_reload_destroy+0x12b/0x300 drivers/net/netdevsim/dev.c:1650
 nsim_dev_reload_down+0xdf/0x180 drivers/net/netdevsim/dev.c:964
 devlink_reload+0x1c2/0x6b0 net/core/devlink.c:4042
 devlink_pernet_pre_exit+0x17e/0x220 net/core/devlink.c:11375
 ops_pre_exit_list net/core/net_namespace.c:158 [inline]
 cleanup_net+0x451/0xb00 net/core/net_namespace.c:581
 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2298
 worker_thread+0x658/0x11f0 kernel/workqueue.c:2445
 kthread+0x405/0x4f0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-selinux-root 2021/11/18 15:38 upstream 42eb8fdac2fc 31a30fc0 .config log report info WARNING: refcount bug in nsim_destroy
ci-upstream-net-kasan-gce 2021/11/14 08:12 net-next 66f4beaa6c1d 83f5c9b5 .config log report info WARNING: refcount bug in nsim_destroy