possible deadlock in blk_request_module (4)

Status: upstream: reported on 2026/09/10 23:54
Reported-by: syzbot+e875946a5b2fbe0c27e3@syzkaller.appspotmail.com
First crash: 70d, last: 9h04m
▶ ▼ Similar bugs (7)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 possible deadlock in blk_request_module (2) 4 6 337d 499d 0/3 auto-obsoleted due to no activity on 2026/03/27 18:48
linux-6.1 possible deadlock in blk_request_module 4 24 3d16h 30d 0/3 upstream: reported on 2026/10/20 20:24
linux-5.15 possible deadlock in blk_request_module (3) 4 2 207d 230d 0/3 auto-obsoleted due to no activity on 2026/08/04 13:53
upstream possible deadlock in blk_request_module (2) prio:low raid 4 syz, C 3176 17m 178d 0/29 upstream: reported C repro on 2026/05/25 20:24
linux-6.6 possible deadlock in blk_request_module 4 20 1d07h 76d 0/2 upstream: reported on 2026/09/05 07:50
linux-5.15 possible deadlock in blk_request_module 4 6 734d 864d 0/3 auto-obsoleted due to no activity on 2025/02/24 02:18
upstream possible deadlock in blk_request_module block 4 2 1839d 1884d 0/29 auto-closed as invalid on 2022/03/06 21:21

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.8.1200/9941 is trying to acquire lock:
ffffffff8d70fc48 (major_names_lock){+.+.}-{3:3}, at: blk_probe_dev block/genhd.c:689 [inline]
ffffffff8d70fc48 (major_names_lock){+.+.}-{3:3}, at: blk_request_module+0x31/0x290 block/genhd.c:705

but task is already holding lock:
ffff8880645bc2c0 (&mddev->reconfig_mutex){+.+.}-{3:3}, at: mddev_lock drivers/md/md.h:543 [inline]
ffff8880645bc2c0 (&mddev->reconfig_mutex){+.+.}-{3:3}, at: new_dev_store+0x222/0x660 drivers/md/md.c:4671

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #4 (&mddev->reconfig_mutex){+.+.}-{3:3}:
       __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_interruptible_nested+0x17/0x20 kernel/locking/mutex.c:765
       mddev_lock drivers/md/md.h:543 [inline]
       new_dev_store+0x222/0x660 drivers/md/md.c:4671
       md_attr_store+0xdd/0x130 drivers/md/md.c:5643
       kernfs_fop_write_iter+0x3a8/0x500 fs/kernfs/file.c:296
       call_write_iter include/linux/fs.h:2179 [inline]
       new_sync_write fs/read_write.c:507 [inline]
       vfs_write+0x748/0xd70 fs/read_write.c:594
       ksys_write+0x153/0x260 fs/read_write.c:647
       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

-> #3 (kn->active#910){++++}-{0:0}:
       kernfs_drain fs/kernfs/dir.c:478 [inline]
       __kernfs_remove+0x5da/0xcb0 fs/kernfs/dir.c:1372
       kernfs_remove+0x1d/0x30 fs/kernfs/dir.c:1406
       __kobject_del+0xe0/0x2e0 lib/kobject.c:628
       kobject_del+0x41/0x60 lib/kobject.c:651
       mddev_delayed_delete+0x27/0x30 drivers/md/md.c:5686
       process_one_work+0x867/0xff0 kernel/workqueue.c:2310
       worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457
       kthread+0x42e/0x520 kernel/kthread.c:334
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

-> #2 ((work_completion)(&mddev->del_work)){+.+.}-{0:0}:
       process_one_work+0x7ba/0xff0 kernel/workqueue.c:2286
       worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457
       kthread+0x42e/0x520 kernel/kthread.c:334
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

-> #1 ((wq_completion)md_misc){+.+.}-{0:0}:
       flush_workqueue+0x16a/0x1390 kernel/workqueue.c:2830
       md_alloc+0x2e/0xc10 drivers/md/md.c:5728
       blk_probe_dev block/genhd.c:692 [inline]
       blk_request_module+0x26e/0x290 block/genhd.c:-1
       blkdev_get_no_open+0x38/0x1d0 block/bdev.c:736
       blkdev_get_by_dev+0x77/0xa50 block/bdev.c:803
       blkdev_open+0x128/0x2c0 block/fops.c:466
       do_dentry_open+0x7f7/0xf90 fs/open.c:826
       do_open fs/namei.c:3659 [inline]
       path_openat+0x2718/0x2fb0 fs/namei.c:3793
       do_filp_open+0x1df/0x400 fs/namei.c:3820
       do_sys_openat2+0x14b/0x500 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

-> #0 (major_names_lock){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3120 [inline]
       check_prevs_add kernel/locking/lockdep.c:3239 [inline]
       validate_chain kernel/locking/lockdep.c:3855 [inline]
       __lock_acquire+0x38f7/0x7d40 kernel/locking/lockdep.c:5120
       lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5737
       __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
       blk_probe_dev block/genhd.c:689 [inline]
       blk_request_module+0x31/0x290 block/genhd.c:705
       blkdev_get_no_open+0x38/0x1d0 block/bdev.c:736
       blkdev_get_by_dev+0x77/0xa50 block/bdev.c:803
       lock_rdev drivers/md/md.c:2583 [inline]
       md_import_device+0x3e2/0x810 drivers/md/md.c:3781
       new_dev_store+0x38d/0x660 drivers/md/md.c:-1
       md_attr_store+0xdd/0x130 drivers/md/md.c:5643
       kernfs_fop_write_iter+0x3a8/0x500 fs/kernfs/file.c:296
       call_write_iter include/linux/fs.h:2179 [inline]
       new_sync_write fs/read_write.c:507 [inline]
       vfs_write+0x748/0xd70 fs/read_write.c:594
       ksys_write+0x153/0x260 fs/read_write.c:647
       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:
  major_names_lock --> 
kn->active#910 --> &mddev->reconfig_mutex

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&mddev->reconfig_mutex);
                               lock(kn->active#910);
                               lock(
&mddev->reconfig_mutex);
  lock(major_names_lock);

 *** DEADLOCK ***

5 locks held by syz.8.1200/9941:
 #0: ffff8880768560f0 (&f->f_pos_lock){+.+.}-{3:3}
, at: __fdget_pos+0x2bf/0x370 fs/file.c:1056
 #1: ffff88807ee04460 (sb_writers#8){.+.+}-{0:0}, at: vfs_write+0x296/0xd70 fs/read_write.c:590
 #2: ffff888079703088 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x1dc/0x500 fs/kernfs/file.c:287
 #3: ffff888039d7b3a8 (kn->active#910){++++}-{0:0}, at: kernfs_fop_write_iter+0x1fd/0x500 fs/kernfs/file.c:288
 #4: ffff8880645bc2c0 (
&mddev->reconfig_mutex){+.+.}-{3:3}, at: mddev_lock drivers/md/md.h:543 [inline]
&mddev->reconfig_mutex){+.+.}-{3:3}, at: new_dev_store+0x222/0x660 drivers/md/md.c:4671

stack backtrace:
CPU: 0 PID: 9941 Comm: syz.8.1200 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 check_noncircular+0x2f8/0x400 kernel/locking/lockdep.c:2178
 check_prev_add kernel/locking/lockdep.c:3120 [inline]
 check_prevs_add kernel/locking/lockdep.c:3239 [inline]
 validate_chain kernel/locking/lockdep.c:3855 [inline]
 __lock_acquire+0x38f7/0x7d40 kernel/locking/lockdep.c:5120
 lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5737
 __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
 blk_probe_dev block/genhd.c:689 [inline]
 blk_request_module+0x31/0x290 block/genhd.c:705
 blkdev_get_no_open+0x38/0x1d0 block/bdev.c:736
 blkdev_get_by_dev+0x77/0xa50 block/bdev.c:803
 lock_rdev drivers/md/md.c:2583 [inline]
 md_import_device+0x3e2/0x810 drivers/md/md.c:3781
 new_dev_store+0x38d/0x660 drivers/md/md.c:-1
 md_attr_store+0xdd/0x130 drivers/md/md.c:5643
 kernfs_fop_write_iter+0x3a8/0x500 fs/kernfs/file.c:296
 call_write_iter include/linux/fs.h:2179 [inline]
 new_sync_write fs/read_write.c:507 [inline]
 vfs_write+0x748/0xd70 fs/read_write.c:594
 ksys_write+0x153/0x260 fs/read_write.c:647
 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:0x7fea5a937559
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:00007fea58b84028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fea5abb3fa0 RCX: 00007fea5a937559
RDX: 0000000000000016 RSI: 0000200000000280 RDI: 0000000000000008
RBP: 00007fea5a9c6136 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fea5abb4038 R14: 00007fea5abb3fa0 R15: 00007ffca0000708
 </TASK>
debugfs: creating file 'ram16'
device: 'ram16': device_add
kobject: 'ram16' (ffff88805fb0ea00): kobject_add_internal: parent: 'block', set: 'devices'
block ram16: No ACPI support
PM: Adding info for No Bus:ram16
kobject: 'ram16' (ffff88805fb0ea00): kobject_uevent_env
kobject: 'ram16' (ffff88805fb0ea00): kobject_uevent_env: uevent_suppress caused the event to drop!
kobject: 'holders' (ffff888062ebf280): kobject_add_internal: parent: 'ram16', set: '<NULL>'
kobject: 'slaves' (ffff888062ebf080): kobject_add_internal: parent: 'ram16', set: '<NULL>'
kobject: 'queue' (ffff888024730ef8): kobject_add_internal: parent: 'ram16', set: '<NULL>'
debugfs: creating file 'ram16'
kobject: 'queue' (ffff888024730ef8): kobject_uevent_env
kobject: 'queue' (ffff888024730ef8): kobject_uevent_env: filter function caused the event to drop!
device: '1:16': device_add
kobject: '1:16' (ffff888023b5d000): kobject_add_internal: parent: 'bdi', set: 'devices'
bdi 1:16: No ACPI support
PM: Adding info for No Bus:1:16
kobject: '1:16' (ffff888023b5d000): kobject_uevent_env
kobject: '1:16' (ffff888023b5d000): fill_kobj_path: path = '/devices/virtual/bdi/1:16'
debugfs: creating file '1:16'
debugfs: creating file 'stats'
kobject: 'ram16' (ffff88805fb0ea00): kobject_uevent_env
kobject: 'ram16' (ffff88805fb0ea00): fill_kobj_path: path = '/devices/virtual/block/ram16'
block device autoloading is deprecated and will be removed.
md: bind<ram16>
kobject: 'dev-ram16' (ffff8880296b5878): kobject_add_internal: parent: 'md', set: '<NULL>'
kcov: kcov_task_exit: t = ffff88802b901dc0, kcov->t = ffff88802b901dc0

Crashes (46):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/20 00:52 linux-5.15.y 29c6cdaac04a 229865fb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/19 11:24 linux-5.15.y 29c6cdaac04a f138241c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/17 21:55 linux-5.15.y 29c6cdaac04a 122f94d5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/17 14:38 linux-5.15.y 29c6cdaac04a 43af6cac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/17 01:52 linux-5.15.y 29c6cdaac04a a3e64cfc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/17 01:49 linux-5.15.y 29c6cdaac04a a3e64cfc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/17 01:47 linux-5.15.y 29c6cdaac04a a3e64cfc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/16 16:54 linux-5.15.y 29c6cdaac04a 31830773 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/14 03:25 linux-5.15.y 29c6cdaac04a 819ebe34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/13 18:22 linux-5.15.y 29c6cdaac04a be5d1971 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/13 17:08 linux-5.15.y 29c6cdaac04a be5d1971 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/13 10:00 linux-5.15.y 29c6cdaac04a 26b2fee0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/13 09:56 linux-5.15.y 29c6cdaac04a 26b2fee0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/13 09:28 linux-5.15.y 29c6cdaac04a 26b2fee0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/12 21:49 linux-5.15.y 29c6cdaac04a c0087d7f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/12 04:52 linux-5.15.y 29c6cdaac04a 8d68b303 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/12 03:39 linux-5.15.y 29c6cdaac04a 8d68b303 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/11 16:03 linux-5.15.y 29c6cdaac04a e56a968c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/07 15:45 linux-5.15.y 29c6cdaac04a 5cecaf1f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/07 00:03 linux-5.15.y 29c6cdaac04a 5cecaf1f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/06 00:29 linux-5.15.y 700e62ea909a 5cecaf1f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/04 20:46 linux-5.15.y 700e62ea909a 73438ed0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/04 10:32 linux-5.15.y 700e62ea909a 5af5b6c6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/04 08:01 linux-5.15.y 700e62ea909a 5af5b6c6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/03 20:29 linux-5.15.y 700e62ea909a e2d35131 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/03 18:14 linux-5.15.y 700e62ea909a e2d35131 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/11/02 15:40 linux-5.15.y 700e62ea909a 6969b601 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/10/28 20:56 linux-5.15.y 792fbe1537d8 858db2ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/10/28 20:53 linux-5.15.y 792fbe1537d8 858db2ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/10/28 02:07 linux-5.15.y 792fbe1537d8 96923c60 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/10/28 00:41 linux-5.15.y 792fbe1537d8 96923c60 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/10/25 08:34 linux-5.15.y 792fbe1537d8 1d9ca40b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/10/23 10:13 linux-5.15.y 792fbe1537d8 d566bfda .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/10/22 16:49 linux-5.15.y 792fbe1537d8 b55fad29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/10/22 02:47 linux-5.15.y 792fbe1537d8 4ba27f85 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/10/22 01:28 linux-5.15.y 792fbe1537d8 4ba27f85 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/10/21 14:37 linux-5.15.y 792fbe1537d8 61c200c7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/10/10 20:50 linux-5.15.y a051a4bf909f 4f92358f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/10/08 10:33 linux-5.15.y a051a4bf909f 4f6a9fcf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/10/02 07:10 linux-5.15.y 0248c33e835e 6d32eb1f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/09/29 07:11 linux-5.15.y 0248c33e835e 7bf4ea23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
2026/09/10 23:53 linux-5.15.y 0996e0926f6b 1fe56c0a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in blk_request_module
* Struck through repros no longer work on HEAD.