mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: syzbot <syzbot+2e02ccadb3c5522a5c59@syzkaller.appspotmail.com>
To: axboe@kernel.dk, dlemoal@kernel.org, linux-block@vger.kernel.org,
	 linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: [syzbot] [block?] possible deadlock in sd_revalidate_disk
Date: Tue, 22 Sep 2026 04:54:56 -0700	[thread overview]
Message-ID: <6ab26c90.c68e76dc.23da29.00ab.GAE@google.com> (raw)

Hello,

syzbot found the following issue on:

HEAD commit:    9d80aa4617b3 Add linux-next specific files for 20260903
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=175ba915580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=b370c26fb58c72f0
dashboard link: https://syzkaller.appspot.com/bug?extid=2e02ccadb3c5522a5c59
compiler:       Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/84a12994f553/disk-9d80aa46.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/2329deeb3b2b/vmlinux-9d80aa46.xz
kernel image: https://storage.googleapis.com/syzbot-assets/689910d8c695/bzImage-9d80aa46.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+2e02ccadb3c5522a5c59@syzkaller.appspotmail.com

sd 1:0:0:0: [sdb] Test Unit Ready failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
sd 1:0:0:0: [sdb] Read Capacity(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
sd 1:0:0:0: [sdb] Sense not available.
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Tainted: G             L     
------------------------------------------------------
kworker/u8:3/49 is trying to acquire lock:
ffffffff8f090420 (fs_reclaim){+.+.}-{0:0}, at: might_alloc include/linux/sched/mm.h:316 [inline]
ffffffff8f090420 (fs_reclaim){+.+.}-{0:0}, at: slab_pre_alloc_hook mm/slub.c:4636 [inline]
ffffffff8f090420 (fs_reclaim){+.+.}-{0:0}, at: slab_alloc_node mm/slub.c:4974 [inline]
ffffffff8f090420 (fs_reclaim){+.+.}-{0:0}, at: __do_kmalloc_node mm/slub.c:5418 [inline]
ffffffff8f090420 (fs_reclaim){+.+.}-{0:0}, at: __kmalloc_noprof+0xbc/0x710 mm/slub.c:5444

but task is already holding lock:
ffff888012ece3b8 (&q->limits_lock){+.+.}-{4:4}, at: queue_limits_start_update include/linux/blkdev.h:1101 [inline]
ffff888012ece3b8 (&q->limits_lock){+.+.}-{4:4}, at: sd_revalidate_disk+0xb88/0xb350 drivers/scsi/sd.c:3803

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&q->limits_lock){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821
       queue_limits_start_update include/linux/blkdev.h:1101 [inline]
       disk_update_zone_resources block/blk-zoned.c:2067 [inline]
       blk_revalidate_disk_zones+0xad9/0x12e0 block/blk-zoned.c:2375
       nvme_mpath_revalidate_zones+0x106/0x1c0 drivers/nvme/host/multipath.c:301
       nvme_update_ns_info+0x984/0x1200 drivers/nvme/host/core.c:2622
       nvme_alloc_ns drivers/nvme/host/core.c:4284 [inline]
       nvme_scan_ns+0x2563/0x3640 drivers/nvme/host/core.c:4471
       async_run_entry_fn+0x9d/0x430 kernel/async.c:129
       process_one_work kernel/workqueue.c:3399 [inline]
       process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3482
       worker_thread+0xa47/0xfb0 kernel/workqueue.c:3563
       kthread+0x38b/0x480 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

-> #1 (&q->q_usage_counter(io)#77){++++}-{0:0}:
       blk_alloc_queue+0x544/0x690 block/blk-core.c:504
       __blk_alloc_disk+0xe3/0x1d0 block/genhd.c:1527
       nvme_mpath_alloc_disk+0x5c2/0x8b0 drivers/nvme/host/multipath.c:769
       nvme_alloc_ns_head drivers/nvme/host/core.c:4043 [inline]
       nvme_init_ns_head drivers/nvme/host/core.c:4144 [inline]
       nvme_alloc_ns drivers/nvme/host/core.c:4258 [inline]
       nvme_scan_ns+0x1e0f/0x3640 drivers/nvme/host/core.c:4471
       async_run_entry_fn+0x9d/0x430 kernel/async.c:129
       process_one_work kernel/workqueue.c:3399 [inline]
       process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3482
       worker_thread+0xa47/0xfb0 kernel/workqueue.c:3563
       kthread+0x38b/0x480 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 (fs_reclaim){+.+.}-{0:0}:
       check_prev_add kernel/locking/lockdep.c:3209 [inline]
       check_prevs_add kernel/locking/lockdep.c:3328 [inline]
       validate_chain kernel/locking/lockdep.c:3952 [inline]
       __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288
       lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
       __fs_reclaim_acquire mm/page_alloc.c:4357 [inline]
       fs_reclaim_acquire+0x71/0x100 mm/page_alloc.c:4371
       might_alloc include/linux/sched/mm.h:316 [inline]
       slab_pre_alloc_hook mm/slub.c:4636 [inline]
       slab_alloc_node mm/slub.c:4974 [inline]
       __do_kmalloc_node mm/slub.c:5418 [inline]
       __kmalloc_noprof+0xbc/0x710 mm/slub.c:5444
       _kmalloc_noprof include/linux/slab.h:995 [inline]
       sd_read_block_zero drivers/scsi/sd.c:3749 [inline]
       sd_revalidate_disk+0x177d/0xb350 drivers/scsi/sd.c:3817
       sd_probe+0x9f3/0x1180 drivers/scsi/sd.c:4101
       call_driver_probe drivers/base/dd.c:-1 [inline]
       really_probe+0x254/0xae0 drivers/base/dd.c:706
       __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
       driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
       __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
       bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
       __device_attach_async_helper+0x1e7/0x2b0 drivers/base/dd.c:1055
       async_run_entry_fn+0x9d/0x430 kernel/async.c:129
       process_one_work kernel/workqueue.c:3399 [inline]
       process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3482
       worker_thread+0xa47/0xfb0 kernel/workqueue.c:3563
       kthread+0x38b/0x480 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

other info that might help us debug this:

Chain exists of:
  fs_reclaim --> &q->q_usage_counter(io)#77 --> &q->limits_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&q->limits_lock);
                               lock(&q->q_usage_counter(io)#77);
                               lock(&q->limits_lock);
  lock(fs_reclaim);

 *** DEADLOCK ***

locks held by kworker/u8:3/49: 4, last CPU#0:
 #0: ffff88801bedc940 ((wq_completion)async){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
 #0: ffff88801bedc940 ((wq_completion)async){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
 #0: ffff88801bedc940 ((wq_completion)async){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3364 [inline]
 #0: ffff88801bedc940 ((wq_completion)async){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3482
 #1: ffffc90000ba7c40 ((work_completion)(&entry->work)){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
 #1: ffffc90000ba7c40 ((work_completion)(&entry->work)){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
 #1: ffffc90000ba7c40 ((work_completion)(&entry->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3364 [inline]
 #1: ffffc90000ba7c40 ((work_completion)(&entry->work)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3482
 #2: ffff888075d823c0 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1104 [inline]
 #2: ffff888075d823c0 (&dev->mutex){....}-{4:4}, at: __device_attach_async_helper+0xa4/0x2b0 drivers/base/dd.c:1041
 #3: ffff888012ece3b8 (&q->limits_lock){+.+.}-{4:4}, at: queue_limits_start_update include/linux/blkdev.h:1101 [inline]
 #3: ffff888012ece3b8 (&q->limits_lock){+.+.}-{4:4}, at: sd_revalidate_disk+0xb88/0xb350 drivers/scsi/sd.c:3803

stack backtrace:
CPU: 0 UID: 0 PID: 49 Comm: kworker/u8:3 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: async async_run_entry_fn
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2087
 check_noncircular+0x12f/0x150 kernel/locking/lockdep.c:2219
 check_prev_add kernel/locking/lockdep.c:3209 [inline]
 check_prevs_add kernel/locking/lockdep.c:3328 [inline]
 validate_chain kernel/locking/lockdep.c:3952 [inline]
 __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288
 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
 __fs_reclaim_acquire mm/page_alloc.c:4357 [inline]
 fs_reclaim_acquire+0x71/0x100 mm/page_alloc.c:4371
 might_alloc include/linux/sched/mm.h:316 [inline]
 slab_pre_alloc_hook mm/slub.c:4636 [inline]
 slab_alloc_node mm/slub.c:4974 [inline]
 __do_kmalloc_node mm/slub.c:5418 [inline]
 __kmalloc_noprof+0xbc/0x710 mm/slub.c:5444
 _kmalloc_noprof include/linux/slab.h:995 [inline]
 sd_read_block_zero drivers/scsi/sd.c:3749 [inline]
 sd_revalidate_disk+0x177d/0xb350 drivers/scsi/sd.c:3817
 sd_probe+0x9f3/0x1180 drivers/scsi/sd.c:4101
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach_async_helper+0x1e7/0x2b0 drivers/base/dd.c:1055
 async_run_entry_fn+0x9d/0x430 kernel/async.c:129
 process_one_work kernel/workqueue.c:3399 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3482
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3563
 kthread+0x38b/0x480 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
 </TASK>
sd 1:0:0:0: [sdb] 0 512-byte logical blocks: (0 B/0 B)
sd 1:0:0:0: [sdb] 0-byte physical blocks
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Mode Sense: 00 00 00 00
sd 1:0:0:0: [sdb] Asking for cache data failed
sd 1:0:0:0: [sdb] Assuming drive cache: write through
sd 1:0:0:0: [sdb] Attached SCSI removable disk


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

                 reply	other threads:[~2026-09-22 11:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6ab26c90.c68e76dc.23da29.00ab.GAE@google.com \
    --to=syzbot+2e02ccadb3c5522a5c59@syzkaller.appspotmail.com \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®