From: Greg KH <greg@kroah.com>
To: Chao S <coshi036@gmail.com>
Cc: stable@vger.kernel.org, Weidong Zhu <weizhu@fiu.edu>
Subject: Re: Please backport 49f06cff50a4 ("block: skip sync_blockdev() on surprise removal in bdev_mark_dead()") to 6.6.y, 6.12.y, 6.18.y
Date: Wed, 15 Jul 2026 06:48:00 +0200 [thread overview]
Message-ID: <2026071548-remember-handling-8672@gregkh> (raw)
In-Reply-To: <CACd_6n3dExLLL8fziY0ha+nDupfb+q45VCbjA7aAYNnj-YkY8g@mail.gmail.com>
On Tue, Jul 14, 2026 at 05:20:19PM -0400, Chao S wrote:
> Hi stable team,
>
> Please consider the following mainline commit for the stable trees:
>
> commit 49f06cff50a4ccf3b7a1a662ceb892b3b21a527a
> Author: Chao Shi <coshi036@gmail.com>
> "block: skip sync_blockdev() on surprise removal in bdev_mark_dead()"
>
> Why it should be applied:
> On surprise removal (@surprise == true) the device is already gone, but the
> bare block-device path in bdev_mark_dead() (no ->mark_dead holder op) calls
> sync_blockdev() unconditionally. It can then hang forever in
> folio_wait_writeback() waiting on writeback that can never complete. We hit
> this via nvme_reset_work()'s "I/O queues lost" path
> (nvme_mark_namespaces_dead -> blk_mark_disk_dead -> bdev_mark_dead(bdev, true)),
> which wedges the reset worker and every task serialized behind it -- an
> unrecoverable hung-task/DoS (multiple tasks blocked >120s, reproduced several
> times under fuzzing). The fix simply skips the futile sync on surprise removal,
> matching fs_bdev_mark_dead(); invalidate_bdev() still runs and orderly removal
> is unchanged.
>
> Affected versions:
> Fixes: d8530de5a6e8 ("block: call into the file system for bdev_mark_dead")
> which first shipped in v6.6 (it dropped the pre-existing !surprise guard from
> the bare-bdev path). So the bug is present in v6.6 through the fix.
> v7.0+ already
> carries the fix, and pre-6.6 trees still have the original guard, so
> this is only
> needed for the 6.6.y, 6.12.y and 6.18.y stable trees.
>
> The change is a self-contained one-line guard (plus a comment) in
> bdev_mark_dead()
> and should cherry-pick cleanly onto all three; happy to send adjusted backports
> if any tree conflicts.
We need a 6.6.y backport as it does not apply cleanly there.
thanks,
greg k-h
next prev parent reply other threads:[~2026-07-15 4:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 21:20 Please backport 49f06cff50a4 ("block: skip sync_blockdev() on surprise removal in bdev_mark_dead()") to 6.6.y, 6.12.y, 6.18.y Chao S
2026-07-15 4:48 ` Greg KH [this message]
2026-07-15 7:46 ` Chao S
2026-07-16 7:34 ` [PATCH 6.6.y] block: skip sync_blockdev() on surprise removal in bdev_mark_dead() Chao Shi
2026-07-17 1:37 ` Sasha Levin
2026-07-18 2:54 ` Chao S
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=2026071548-remember-handling-8672@gregkh \
--to=greg@kroah.com \
--cc=coshi036@gmail.com \
--cc=stable@vger.kernel.org \
--cc=weizhu@fiu.edu \
/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