possible deadlock in md_start_sync

Status: upstream: reported syz repro on 2026/08/02 00:00
Subsystems: kernel
Labels: prio:low
[Documentation on labels]
Reported-by: syzbot+13eb8132f7693fe21d7d@syzkaller.appspotmail.com
First crash: 54d, last: 1h01m
✨ AI Jobs (3)
ID Workflow Result Correct Bug Created Started Finished Revision
cc2ed4dd patching 💥 possible deadlock in md_start_sync 2026/09/14 21:23 2026/09/15 01:11 2026/09/15 01:36 81a27d1a
6641fc69 repro-c Reproduced: ✅ possible deadlock in md_start_sync 2026/09/14 21:04 2026/09/14 21:04 2026/09/14 22:40 81a27d1a
8f03291e assessment-security DenialOfService: ✅ Exploitable: ❌ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ possible deadlock in md_start_sync 2026/07/29 03:12 2026/07/29 03:12 2026/07/29 03:21 7be3c40b
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [raid?] possible deadlock in md_start_sync 0 (2) 2026/09/14 21:21
Last patch testing requests (1)
Created Duration User Patch Repo Result
2026/09/14 22:40 18m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 704340f1cd0dcef829eb62f5b48ae95a2ce17bdf report job log log
Cause bisection attempts (1)
Created Duration User Patch Repo Result
2026/09/20 18:15 0m bisect upstream error

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/0:0/9 is trying to acquire lock:
ffff888026076358 (&mddev->reconfig_mutex){+.+.}-{4:4}, at: mddev_lock_nointr drivers/md/md.h:734 [inline]
ffff888026076358 (&mddev->reconfig_mutex){+.+.}-{4:4}, at: md_start_sync+0xc4/0xea0 drivers/md/md.c:10275

but task is already holding lock:
ffffc900000e7d08 ((work_completion)(&mddev->sync_work)){+.+.}-{0:0}, at: process_one_work+0xa2c/0x1b10 kernel/workqueue.c:3372

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 ((work_completion)(&mddev->sync_work)){+.+.}-{0:0}:
       lock_acquire kernel/locking/lockdep.c:5942 [inline]
       lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899
       process_one_work+0xa32/0x1b10 kernel/workqueue.c:3372
       process_scheduled_works kernel/workqueue.c:3479 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560
       kthread+0x373/0x450 kernel/kthread.c:436
       ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #2 ((wq_completion)md_misc){+.+.}-{0:0}:
       lock_acquire kernel/locking/lockdep.c:5942 [inline]
       lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899
       touch_wq_lockdep_map+0xad/0x1c0 kernel/workqueue.c:4111
       __flush_workqueue+0x131/0x1200 kernel/workqueue.c:4153
       md_alloc+0x30/0x10a0 drivers/md/md.c:6334
       md_alloc_and_put drivers/md/md.c:6423 [inline]
       md_probe drivers/md/md.c:6439 [inline]
       md_probe+0x73/0xf0 drivers/md/md.c:6434
       blk_probe_dev+0x149/0x1e0 block/genhd.c:888
       blk_request_module+0x16/0xc0 block/genhd.c:901
       blkdev_get_no_open+0x9b/0xf0 block/bdev.c:870
       blkdev_open+0x141/0x4f0 block/fops.c:665
       do_dentry_open+0x6ab/0x14d0 fs/open.c:996
       vfs_open+0x82/0x3f0 fs/open.c:1101
       do_open fs/namei.c:4837 [inline]
       path_openat+0x19fa/0x2440 fs/namei.c:5000
       do_file_open+0x20e/0x430 fs/namei.c:5029
       do_sys_openat2+0x10f/0x1e0 fs/open.c:1417
       do_sys_open fs/open.c:1423 [inline]
       __do_sys_openat fs/open.c:1439 [inline]
       __se_sys_openat fs/open.c:1434 [inline]
       __x64_sys_openat+0x12d/0x210 fs/open.c:1434
       do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
       do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (major_names_lock){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5942 [inline]
       lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       blk_probe_dev+0x28/0x1e0 block/genhd.c:885
       blk_request_module+0x16/0xc0 block/genhd.c:901
       blkdev_get_no_open+0x9b/0xf0 block/bdev.c:870
       bdev_file_open_by_dev block/bdev.c:1091 [inline]
       bdev_file_open_by_dev+0x70/0x210 block/bdev.c:1079
       md_import_device+0x120/0x360 drivers/md/md.c:3847
       md_add_new_disk+0xdbf/0x1820 drivers/md/md.c:7656
       md_ioctl+0x2bec/0x36d0 drivers/md/md.c:8499
       blkdev_ioctl+0x5ad/0x6f0 block/ioctl.c:798
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl fs/ioctl.c:583 [inline]
       __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
       do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&mddev->reconfig_mutex){+.+.}-{4:4}:
       check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3209
       check_prevs_add kernel/locking/lockdep.c:3328 [inline]
       validate_chain kernel/locking/lockdep.c:3952 [inline]
       __lock_acquire+0x1528/0x1f40 kernel/locking/lockdep.c:5288
       lock_acquire kernel/locking/lockdep.c:5942 [inline]
       lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
       mddev_lock_nointr drivers/md/md.h:734 [inline]
       md_start_sync+0xc4/0xea0 drivers/md/md.c:10275
       process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396
       process_scheduled_works kernel/workqueue.c:3479 [inline]
       worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560
       kthread+0x373/0x450 kernel/kthread.c:436
       ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

other info that might help us debug this:

Chain exists of:
  &mddev->reconfig_mutex --> (wq_completion)md_misc --> (work_completion)(&mddev->sync_work)

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock((work_completion)(&mddev->sync_work));
                               lock((wq_completion)md_misc);
                               lock((work_completion)(&mddev->sync_work));
  lock(&mddev->reconfig_mutex);

 *** DEADLOCK ***

locks held by kworker/0:0/9: 2, last CPU#0:
 #0: ffff88801fadf140 ((wq_completion)md_misc){+.+.}-{0:0}, at: process_one_work+0x1466/0x1b10 kernel/workqueue.c:3371
 #1: ffffc900000e7d08 ((work_completion)(&mddev->sync_work)){+.+.}-{0:0}, at: process_one_work+0xa2c/0x1b10 kernel/workqueue.c:3372

stack backtrace:
CPU: 0 UID: 0 PID: 9 Comm: kworker/0:0 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/05/2026
Workqueue: md_misc md_start_sync
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_circular_bug.cold+0x178/0x1be kernel/locking/lockdep.c:2087
 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2219
 check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3209
 check_prevs_add kernel/locking/lockdep.c:3328 [inline]
 validate_chain kernel/locking/lockdep.c:3952 [inline]
 __lock_acquire+0x1528/0x1f40 kernel/locking/lockdep.c:5288
 lock_acquire kernel/locking/lockdep.c:5942 [inline]
 lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899
 __mutex_lock_common kernel/locking/mutex.c:646 [inline]
 __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
 mddev_lock_nointr drivers/md/md.h:734 [inline]
 md_start_sync+0xc4/0xea0 drivers/md/md.c:10275
 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396
 process_scheduled_works kernel/workqueue.c:3479 [inline]
 worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560
 kthread+0x373/0x450 kernel/kthread.c:436
 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Crashes (223):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/14 21:21 upstream 704340f1cd0d 924033e8 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in md_start_sync
2026/09/18 16:07 upstream 5dd1818b15d9 8d7d05f1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in md_start_sync
2026/09/17 23:56 upstream 4982d3552a3b 95928915 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in md_start_sync
2026/09/17 10:49 upstream 238650ef6c7c 95928915 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in md_start_sync
2026/09/17 01:30 upstream 9b87fdc9af2f 95928915 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in md_start_sync
2026/09/16 06:05 upstream 9b87fdc9af2f 12a0a44a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in md_start_sync
2026/09/14 21:18 upstream 704340f1cd0d 924033e8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in md_start_sync
2026/09/13 19:47 upstream 2f0c1cf72f46 70a60e12 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in md_start_sync
2026/09/13 15:47 upstream 2f0c1cf72f46 70a60e12 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in md_start_sync
2026/09/12 13:49 upstream 5225b8eec4c9 70a60e12 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in md_start_sync
2026/09/10 00:29 upstream 50d05c7c76c9 4e8b1cc6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in md_start_sync
2026/07/28 12:38 upstream 62cc90241548 45ae1df4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in md_start_sync
2026/09/20 21:48 upstream 518e5b794c06 853b104b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/20 19:16 upstream 518e5b794c06 853b104b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/20 09:00 upstream 518e5b794c06 853b104b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/19 14:47 upstream 40288c9206c1 853b104b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/19 11:22 upstream 40288c9206c1 853b104b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/19 00:18 upstream 5dd1818b15d9 853b104b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/18 21:28 upstream 5dd1818b15d9 853b104b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/18 14:18 upstream 5dd1818b15d9 853b104b .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in md_start_sync
2026/09/18 13:18 upstream 5dd1818b15d9 853b104b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/18 06:49 upstream 4982d3552a3b 8d7d05f1 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/18 02:35 upstream 4982d3552a3b 8d7d05f1 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/17 14:53 upstream 238650ef6c7c 4a607247 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/17 12:52 upstream 238650ef6c7c 4a607247 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/17 12:52 upstream 238650ef6c7c 4a607247 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/17 08:04 upstream 238650ef6c7c 95928915 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/16 19:38 upstream 9b87fdc9af2f b0e4c57e .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/16 13:10 upstream 9b87fdc9af2f b0e4c57e .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/16 08:25 upstream f6e7b42bf05b 12a0a44a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/16 08:18 upstream f6e7b42bf05b 12a0a44a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/16 04:09 upstream f6e7b42bf05b 12a0a44a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/16 00:45 upstream f6e7b42bf05b 12a0a44a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/15 20:00 upstream f6e7b42bf05b f41e228a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/15 14:59 upstream 587858367581 f41e228a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/15 03:35 upstream 587858367581 81a27d1a .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in md_start_sync
2026/09/15 02:21 upstream 587858367581 81a27d1a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/14 16:14 upstream 704340f1cd0d 924033e8 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/14 15:09 upstream 704340f1cd0d 924033e8 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/14 14:22 upstream 704340f1cd0d 924033e8 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/14 12:45 upstream 704340f1cd0d 924033e8 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/14 00:45 upstream d681d7ef617e 70a60e12 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/13 17:22 upstream 2f0c1cf72f46 70a60e12 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/13 13:51 upstream 2f0c1cf72f46 70a60e12 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/13 11:04 upstream 2f0c1cf72f46 70a60e12 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in md_start_sync
2026/09/20 04:08 upstream 50d05c7c76c9 853b104b .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in md_start_sync
2026/09/19 22:44 upstream 50d05c7c76c9 853b104b .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in md_start_sync
2026/09/17 03:07 upstream 50d05c7c76c9 95928915 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in md_start_sync
2026/09/15 13:15 upstream 50d05c7c76c9 f41e228a .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in md_start_sync
2026/09/15 09:16 upstream 50d05c7c76c9 81a27d1a .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in md_start_sync
2026/09/14 10:01 upstream 50d05c7c76c9 70a60e12 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in md_start_sync
2026/07/28 01:45 upstream 62cc90241548 4a865b71 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in md_start_sync
2026/09/20 17:44 linux-next 9d80aa4617b3 853b104b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in md_start_sync
2026/09/15 11:13 linux-next 9d80aa4617b3 81a27d1a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in md_start_sync
2026/09/02 02:23 linux-next 8b72f6626dc3 587f6b29 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in md_start_sync
* Struck through repros no longer work on HEAD.