syzbot


possible deadlock in genl_rcv

Status: upstream: reported on 2026/05/29 04:19
Reported-by: syzbot+28ffde87cd851ffc1c52@syzkaller.appspotmail.com
First crash: 11d, last: 11d
Similar bugs (6)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in genl_rcv (4) net prio:low 4 10 9d18h 15d 0/29 upstream: reported on 2026/05/24 13:47
upstream possible deadlock in genl_rcv net 4 1 3104d 3100d 0/29 closed as invalid on 2018/02/13 19:42
linux-4.19 possible deadlock in genl_rcv (2) 4 1 1669d 1669d 0/1 auto-closed as invalid on 2022/03/12 20:05
upstream possible deadlock in genl_rcv (3) net 4 1 1626d 1621d 0/29 auto-closed as invalid on 2022/04/25 11:14
linux-4.19 possible deadlock in genl_rcv 4 1 2288d 2288d 0/1 auto-closed as invalid on 2020/07/02 11:07
upstream possible deadlock in genl_rcv (2) net 4 2 2646d 2706d 0/29 auto-closed as invalid on 2019/09/08 03:35

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.6.5397/23098 is trying to acquire lock:
ffffffff8d49a5f0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x15/0x40 net/netlink/genetlink.c:802

but task is already holding lock:
ffff88801ee97868 (&pipe->mutex/1){+.+.}-{3:3}, at: splice_from_pipe fs/splice.c:596 [inline]
ffff88801ee97868 (&pipe->mutex/1){+.+.}-{3:3}, at: generic_splice_sendpage+0xff/0x180 fs/splice.c:746

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #7 (&pipe->mutex/1){+.+.}-{3:3}:
       __mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
       iter_file_splice_write+0x1b5/0xcc0 fs/splice.c:635
       do_splice_from fs/splice.c:767 [inline]
       do_splice+0xe5a/0x1640 fs/splice.c:1108
       __do_splice fs/splice.c:1173 [inline]
       __do_sys_splice fs/splice.c:1379 [inline]
       __se_sys_splice+0x34d/0x440 fs/splice.c:1361
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> #6 (sb_writers#3){.+.+}-{0:0}:
       percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
       __sb_start_write include/linux/fs.h:1811 [inline]
       sb_start_write include/linux/fs.h:1881 [inline]
       file_start_write include/linux/fs.h:3043 [inline]
       lo_write_bvec+0x1a0/0x780 drivers/block/loop.c:315
       lo_write_simple drivers/block/loop.c:338 [inline]
       do_req_filebacked drivers/block/loop.c:656 [inline]
       loop_handle_cmd drivers/block/loop.c:2235 [inline]
       loop_process_work+0x1b46/0x24a0 drivers/block/loop.c:2275
       process_one_work+0x85f/0x1010 kernel/workqueue.c:2310
       worker_thread+0xaa6/0x1290 kernel/workqueue.c:2457
       kthread+0x436/0x520 kernel/kthread.c:334
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

-> #5 ((work_completion)(&lo->rootcg_work)){+.+.}-{0:0}:
       process_one_work+0x7bb/0x1010 kernel/workqueue.c:2286
       worker_thread+0xaa6/0x1290 kernel/workqueue.c:2457
       kthread+0x436/0x520 kernel/kthread.c:334
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

-> #4 ((null)){+.+.}-{0:0}:
       flush_workqueue+0x16c/0x13d0 kernel/workqueue.c:2830
       drain_workqueue+0xcf/0x380 kernel/workqueue.c:2995
       destroy_workqueue+0x7b/0xb20 kernel/workqueue.c:4439
       __loop_clr_fd+0x234/0xb90 drivers/block/loop.c:1384
       blkdev_put_whole block/bdev.c:692 [inline]
       blkdev_put+0x53f/0x7d0 block/bdev.c:957
       blkdev_close+0x76/0xa0 block/fops.c:478
       __fput+0x234/0x930 fs/file_table.c:311
       task_work_run+0x125/0x1a0 kernel/task_work.c:188
       tracehook_notify_resume include/linux/tracehook.h:189 [inline]
       exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181
       exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214
       __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
       syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307
       do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> #3 (&lo->lo_mutex){+.+.}-{3:3}:
       __mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_killable_nested+0x17/0x20 kernel/locking/mutex.c:758
       lo_open+0x6a/0x100 drivers/block/loop.c:2056
       blkdev_get_whole+0x90/0x390 block/bdev.c:669
       blkdev_get_by_dev+0x2d0/0xa60 block/bdev.c:827
       blkdev_open+0x12d/0x2c0 block/fops.c:466
       do_dentry_open+0x7ff/0xf80 fs/open.c:826
       do_open fs/namei.c:3616 [inline]
       path_openat+0x26f5/0x2fa0 fs/namei.c:3750
       do_filp_open+0x1e2/0x410 fs/namei.c:3777
       do_sys_openat2+0x150/0x4b0 fs/open.c:1255
       do_sys_open fs/open.c:1271 [inline]
       __do_sys_openat fs/open.c:1287 [inline]
       __se_sys_openat fs/open.c:1282 [inline]
       __x64_sys_openat+0x135/0x160 fs/open.c:1282
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> #2 (&disk->open_mutex){+.+.}-{3:3}:
       __mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
       bd_register_pending_holders+0x33/0x310 block/holder.c:161
       device_add_disk+0x5a7/0xd40 block/genhd.c:486
       add_disk include/linux/genhd.h:200 [inline]
       nbd_dev_add+0x757/0xb20 drivers/block/nbd.c:1786
       nbd_genl_connect+0x850/0x18a0 drivers/block/nbd.c:1927
       genl_family_rcv_msg_doit net/netlink/genetlink.c:731 [inline]
       genl_family_rcv_msg net/netlink/genetlink.c:775 [inline]
       genl_rcv_msg+0xcea/0xf90 net/netlink/genetlink.c:792
       netlink_rcv_skb+0x1f5/0x440 net/netlink/af_netlink.c:2507
       genl_rcv+0x24/0x40 net/netlink/genetlink.c:803
       netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
       netlink_unicast+0x774/0x920 net/netlink/af_netlink.c:1344
       netlink_sendmsg+0x8ba/0xbe0 net/netlink/af_netlink.c:1918
       sock_sendmsg_nosec net/socket.c:706 [inline]
       __sock_sendmsg net/socket.c:718 [inline]
       ____sys_sendmsg+0x5b7/0x8f0 net/socket.c:2445
       ___sys_sendmsg+0x236/0x2e0 net/socket.c:2499
       __sys_sendmsg net/socket.c:2528 [inline]
       __do_sys_sendmsg net/socket.c:2537 [inline]
       __se_sys_sendmsg+0x1af/0x290 net/socket.c:2535
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> #1 (genl_mutex){+.+.}-{3:3}:
       __mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
       genl_lock net/netlink/genetlink.c:33 [inline]
       genl_lock_all net/netlink/genetlink.c:46 [inline]
       genl_register_family+0x3f0/0x10f0 net/netlink/genetlink.c:393
       vdpa_init+0x35/0x70 drivers/vdpa/vdpa.c:903
       do_one_initcall+0x272/0x730 init/main.c:1316
       do_initcall_level+0x137/0x1f0 init/main.c:1389
       do_initcalls+0x4b/0x90 init/main.c:1405
       kernel_init_freeable+0x3e9/0x570 init/main.c:1629
       kernel_init+0x19/0x1b0 init/main.c:1520
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

-> #0 (cb_lock){++++}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3053 [inline]
       check_prevs_add kernel/locking/lockdep.c:3172 [inline]
       validate_chain kernel/locking/lockdep.c:3788 [inline]
       __lock_acquire+0x2c42/0x7d10 kernel/locking/lockdep.c:5012
       lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
       down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498
       genl_rcv+0x15/0x40 net/netlink/genetlink.c:802
       netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
       netlink_unicast+0x774/0x920 net/netlink/af_netlink.c:1344
       netlink_sendmsg+0x8ba/0xbe0 net/netlink/af_netlink.c:1918
       sock_sendmsg_nosec net/socket.c:706 [inline]
       __sock_sendmsg net/socket.c:718 [inline]
       sock_sendmsg net/socket.c:741 [inline]
       kernel_sendmsg+0x234/0x350 net/socket.c:765
       sock_no_sendpage+0x12a/0x1a0 net/core/sock.c:3045
       kernel_sendpage+0x2cb/0x380 net/socket.c:3548
       sock_sendpage+0x7a/0xb0 net/socket.c:1027
       pipe_to_sendpage+0x22f/0x320 fs/splice.c:364
       splice_from_pipe_feed fs/splice.c:418 [inline]
       __splice_from_pipe+0x302/0x820 fs/splice.c:562
       splice_from_pipe fs/splice.c:597 [inline]
       generic_splice_sendpage+0x111/0x180 fs/splice.c:746
       do_splice_from fs/splice.c:767 [inline]
       do_splice+0xe5a/0x1640 fs/splice.c:1108
       __do_splice fs/splice.c:1173 [inline]
       __do_sys_splice fs/splice.c:1379 [inline]
       __se_sys_splice+0x34d/0x440 fs/splice.c:1361
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

other info that might help us debug this:

Chain exists of:
  cb_lock --> sb_writers#3 --> &pipe->mutex/1

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&pipe->mutex/1);
                               lock(sb_writers#3);
                               lock(&pipe->mutex/1);
  lock(cb_lock);

 *** DEADLOCK ***

1 lock held by syz.6.5397/23098:
 #0: ffff88801ee97868 (&pipe->mutex/1){+.+.}-{3:3}, at: splice_from_pipe fs/splice.c:596 [inline]
 #0: ffff88801ee97868 (&pipe->mutex/1){+.+.}-{3:3}, at: generic_splice_sendpage+0xff/0x180 fs/splice.c:746

stack backtrace:
CPU: 1 PID: 23098 Comm: syz.6.5397 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2133
 check_prev_add kernel/locking/lockdep.c:3053 [inline]
 check_prevs_add kernel/locking/lockdep.c:3172 [inline]
 validate_chain kernel/locking/lockdep.c:3788 [inline]
 __lock_acquire+0x2c42/0x7d10 kernel/locking/lockdep.c:5012
 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
 down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498
 genl_rcv+0x15/0x40 net/netlink/genetlink.c:802
 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
 netlink_unicast+0x774/0x920 net/netlink/af_netlink.c:1344
 netlink_sendmsg+0x8ba/0xbe0 net/netlink/af_netlink.c:1918
 sock_sendmsg_nosec net/socket.c:706 [inline]
 __sock_sendmsg net/socket.c:718 [inline]
 sock_sendmsg net/socket.c:741 [inline]
 kernel_sendmsg+0x234/0x350 net/socket.c:765
 sock_no_sendpage+0x12a/0x1a0 net/core/sock.c:3045
 kernel_sendpage+0x2cb/0x380 net/socket.c:3548
 sock_sendpage+0x7a/0xb0 net/socket.c:1027
 pipe_to_sendpage+0x22f/0x320 fs/splice.c:364
 splice_from_pipe_feed fs/splice.c:418 [inline]
 __splice_from_pipe+0x302/0x820 fs/splice.c:562
 splice_from_pipe fs/splice.c:597 [inline]
 generic_splice_sendpage+0x111/0x180 fs/splice.c:746
 do_splice_from fs/splice.c:767 [inline]
 do_splice+0xe5a/0x1640 fs/splice.c:1108
 __do_splice fs/splice.c:1173 [inline]
 __do_sys_splice fs/splice.c:1379 [inline]
 __se_sys_splice+0x34d/0x440 fs/splice.c:1361
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f81af7ace59
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:00007f81ad9e5028 EFLAGS: 00000246 ORIG_RAX: 0000000000000113
RAX: ffffffffffffffda RBX: 00007f81afa26090 RCX: 00007f81af7ace59
RDX: 0000000000000007 RSI: 0000000000000000 RDI: 0000000000000005
RBP: 00007f81af842d6f R08: 000200000000622c R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f81afa26128 R14: 00007f81afa26090 R15: 00007ffd0d9e4588
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/05/29 04:18 linux-5.15.y 241d66fa280c 4624854e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in genl_rcv
* Struck through repros no longer work on HEAD.