netlink: 20 bytes leftover after parsing attributes in process `syz.5.6281'. ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ syz.5.6281/23937 is trying to acquire lock: ffff88804c4529b0 (&set->update_nr_hwq_lock){++++}-{4:4}, at: add_disk_fwnode+0xe7/0x480 block/genhd.c:596 but task is already holding lock: ffffffff8f3ebcd8 (genl_mutex){+.+.}-{4:4}, at: genl_lock net/netlink/genetlink.c:35 [inline] ffffffff8f3ebcd8 (genl_mutex){+.+.}-{4:4}, at: genl_op_lock net/netlink/genetlink.c:60 [inline] ffffffff8f3ebcd8 (genl_mutex){+.+.}-{4:4}, at: genl_rcv_msg+0x10b/0x7a0 net/netlink/genetlink.c:1208 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #7 (genl_mutex){+.+.}-{4:4}: __mutex_lock_common kernel/locking/rtmutex_api.c:534 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:553 genl_lock net/netlink/genetlink.c:35 [inline] genl_lock_all net/netlink/genetlink.c:48 [inline] genl_register_family+0x7b9/0x17b0 net/netlink/genetlink.c:784 vdpa_init+0x39/0x70 drivers/vdpa/vdpa.c:1565 do_one_initcall+0x250/0x870 init/main.c:1347 do_initcall_level+0x104/0x190 init/main.c:1409 do_initcalls+0x59/0xa0 init/main.c:1425 kernel_init_freeable+0x2a6/0x3e0 init/main.c:1658 kernel_init+0x1d/0x1d0 init/main.c:1548 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #6 (cb_lock){++++}-{4:4}: down_read+0x97/0x200 kernel/locking/rwsem.c:1568 genl_rcv+0x19/0x40 net/netlink/genetlink.c:1217 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x780/0x920 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1895 sock_sendmsg_nosec+0x112/0x150 net/socket.c:797 __sock_sendmsg net/socket.c:812 [inline] sock_sendmsg+0x1ca/0x2d0 net/socket.c:835 splice_to_socket+0xae5/0x11f0 fs/splice.c:884 do_splice_from fs/splice.c:936 [inline] do_splice+0xef8/0x1940 fs/splice.c:1349 __do_splice fs/splice.c:1431 [inline] __do_sys_splice fs/splice.c:1634 [inline] __se_sys_splice+0x353/0x490 fs/splice.c:1616 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0x560 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #5 (&pipe->mutex){+.+.}-{4:4}: __mutex_lock_common kernel/locking/rtmutex_api.c:534 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:553 iter_file_splice_write+0x1f3/0x10f0 fs/splice.c:682 do_splice_from fs/splice.c:936 [inline] do_splice+0xef8/0x1940 fs/splice.c:1349 __do_splice fs/splice.c:1431 [inline] __do_sys_splice fs/splice.c:1634 [inline] __se_sys_splice+0x353/0x490 fs/splice.c:1616 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0x560 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #4 (sb_writers#5){.+.+}-{0:0}: percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline] percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline] __sb_start_write include/linux/fs/super.h:19 [inline] sb_start_write include/linux/fs/super.h:125 [inline] kiocb_start_write include/linux/fs.h:2767 [inline] lo_rw_aio+0xb1b/0xf00 drivers/block/loop.c:401 do_req_filebacked drivers/block/loop.c:433 [inline] loop_handle_cmd drivers/block/loop.c:1941 [inline] loop_process_work+0x637/0x11b0 drivers/block/loop.c:1976 process_one_work+0x98b/0x1630 kernel/workqueue.c:3318 process_scheduled_works kernel/workqueue.c:3401 [inline] worker_thread+0xb49/0x1140 kernel/workqueue.c:3482 kthread+0x389/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #3 ((work_completion)(&worker->work)){+.+.}-{0:0}: process_one_work+0x8d7/0x1630 kernel/workqueue.c:3294 process_scheduled_works kernel/workqueue.c:3401 [inline] worker_thread+0xb49/0x1140 kernel/workqueue.c:3482 kthread+0x389/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #2 ((wq_completion)loop4){+.+.}-{0:0}: touch_wq_lockdep_map+0xcb/0x180 kernel/workqueue.c:4033 __flush_workqueue+0x14b/0x14f0 kernel/workqueue.c:4075 drain_workqueue+0xd3/0x390 kernel/workqueue.c:4239 __loop_clr_fd drivers/block/loop.c:1130 [inline] lo_release+0x287/0x8f0 drivers/block/loop.c:1767 bdev_release+0x541/0x660 block/bdev.c:-1 blkdev_release+0x15/0x20 block/fops.c:705 __fput+0x461/0xa70 fs/file_table.c:510 fput_close_sync+0x11f/0x240 fs/file_table.c:615 __do_sys_close fs/open.c:1487 [inline] __se_sys_close fs/open.c:1472 [inline] __x64_sys_close+0x7e/0x110 fs/open.c:1472 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0x560 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&disk->open_mutex){+.+.}-{4:4}: __mutex_lock_common kernel/locking/rtmutex_api.c:534 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:553 __del_gendisk+0x127/0x980 block/genhd.c:710 del_gendisk+0xe7/0x160 block/genhd.c:823 nbd_dev_remove drivers/block/nbd.c:268 [inline] nbd_dev_remove_work+0x47/0xe0 drivers/block/nbd.c:284 process_one_work+0x98b/0x1630 kernel/workqueue.c:3318 process_scheduled_works kernel/workqueue.c:3401 [inline] worker_thread+0xb49/0x1140 kernel/workqueue.c:3482 kthread+0x389/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #0 (&set->update_nr_hwq_lock){++++}-{4:4}: check_prev_add kernel/locking/lockdep.c:3167 [inline] check_prevs_add kernel/locking/lockdep.c:3286 [inline] validate_chain kernel/locking/lockdep.c:3910 [inline] __lock_acquire+0x15a5/0x2d10 kernel/locking/lockdep.c:5239 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5870 down_read+0x97/0x200 kernel/locking/rwsem.c:1568 add_disk_fwnode+0xe7/0x480 block/genhd.c:596 add_disk include/linux/blkdev.h:794 [inline] nbd_dev_add+0x72c/0xb50 drivers/block/nbd.c:1984 nbd_genl_connect+0x965/0x1c80 drivers/block/nbd.c:2125 genl_family_rcv_msg_doit+0x22a/0x330 net/netlink/genetlink.c:1114 genl_family_rcv_msg net/netlink/genetlink.c:1194 [inline] genl_rcv_msg+0x61c/0x7a0 net/netlink/genetlink.c:1209 netlink_rcv_skb+0x232/0x4b0 net/netlink/af_netlink.c:2551 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1218 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x780/0x920 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1895 sock_sendmsg_nosec+0x112/0x150 net/socket.c:797 __sock_sendmsg net/socket.c:812 [inline] ____sys_sendmsg+0x55c/0x870 net/socket.c:2716 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2770 __sys_sendmsg net/socket.c:2802 [inline] __do_sys_sendmsg net/socket.c:2807 [inline] __se_sys_sendmsg net/socket.c:2805 [inline] __x64_sys_sendmsg+0x1c3/0x2a0 net/socket.c:2805 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0x560 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &set->update_nr_hwq_lock --> cb_lock --> genl_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(genl_mutex); lock(cb_lock); lock(genl_mutex); rlock(&set->update_nr_hwq_lock); *** DEADLOCK *** 2 locks held by syz.5.6281/23937: #0: ffffffff8f3ebec0 (cb_lock){++++}-{4:4}, at: genl_rcv+0x19/0x40 net/netlink/genetlink.c:1217 #1: ffffffff8f3ebcd8 (genl_mutex){+.+.}-{4:4}, at: genl_lock net/netlink/genetlink.c:35 [inline] #1: ffffffff8f3ebcd8 (genl_mutex){+.+.}-{4:4}, at: genl_op_lock net/netlink/genetlink.c:60 [inline] #1: ffffffff8f3ebcd8 (genl_mutex){+.+.}-{4:4}, at: genl_rcv_msg+0x10b/0x7a0 net/netlink/genetlink.c:1208 stack backtrace: CPU: 0 UID: 0 PID: 23937 Comm: syz.5.6281 Tainted: G L syzkaller #0 PREEMPT_{RT,(full)} Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2045 check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2177 check_prev_add kernel/locking/lockdep.c:3167 [inline] check_prevs_add kernel/locking/lockdep.c:3286 [inline] validate_chain kernel/locking/lockdep.c:3910 [inline] __lock_acquire+0x15a5/0x2d10 kernel/locking/lockdep.c:5239 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5870 down_read+0x97/0x200 kernel/locking/rwsem.c:1568 add_disk_fwnode+0xe7/0x480 block/genhd.c:596 add_disk include/linux/blkdev.h:794 [inline] nbd_dev_add+0x72c/0xb50 drivers/block/nbd.c:1984 nbd_genl_connect+0x965/0x1c80 drivers/block/nbd.c:2125 genl_family_rcv_msg_doit+0x22a/0x330 net/netlink/genetlink.c:1114 genl_family_rcv_msg net/netlink/genetlink.c:1194 [inline] genl_rcv_msg+0x61c/0x7a0 net/netlink/genetlink.c:1209 netlink_rcv_skb+0x232/0x4b0 net/netlink/af_netlink.c:2551 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1218 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x780/0x920 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1895 sock_sendmsg_nosec+0x112/0x150 net/socket.c:797 __sock_sendmsg net/socket.c:812 [inline] ____sys_sendmsg+0x55c/0x870 net/socket.c:2716 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2770 __sys_sendmsg net/socket.c:2802 [inline] __do_sys_sendmsg net/socket.c:2807 [inline] __se_sys_sendmsg net/socket.c:2805 [inline] __x64_sys_sendmsg+0x1c3/0x2a0 net/socket.c:2805 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0x560 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fdc9d88ce59 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:00007fdc9bade028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fdc9db05fa0 RCX: 00007fdc9d88ce59 RDX: 0000000000000000 RSI: 0000200000000240 RDI: 0000000000000004 RBP: 00007fdc9d922d6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fdc9db06038 R14: 00007fdc9db05fa0 R15: 00007ffe4278d4c8