Skip to content

block: skip sync_blockdev() on surprise removal in bdev_mark_dead()#872

Open
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1099643=>linus-master
Open

block: skip sync_blockdev() on surprise removal in bdev_mark_dead()#872
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1099643=>linus-master

Conversation

@blktests-ci
Copy link
Copy Markdown

@blktests-ci blktests-ci Bot commented May 22, 2026

Pull request for series with
subject: block: skip sync_blockdev() on surprise removal in bdev_mark_dead()
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1099643

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 22, 2026

Upstream branch: 6779b50
series: https://patchwork.kernel.org/project/linux-block/list/?series=1099643
version: 1

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 23, 2026

Upstream branch: 79bd2dd
series: https://patchwork.kernel.org/project/linux-block/list/?series=1099643
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1099643=>linus-master branch from a5a25af to db2b102 Compare May 23, 2026 06:21
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 7af85d1 to de94ac7 Compare May 23, 2026 17:08
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 23, 2026

Upstream branch: eed108e
series: https://patchwork.kernel.org/project/linux-block/list/?series=1099643
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1099643=>linus-master branch from db2b102 to b270bd8 Compare May 23, 2026 17:25
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 25, 2026

Upstream branch: eed108e
series: https://patchwork.kernel.org/project/linux-block/list/?series=1099643
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1099643=>linus-master branch from b270bd8 to 0b2ce2a Compare May 25, 2026 06:33
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from de94ac7 to 86d8d37 Compare May 26, 2026 15:37
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 26, 2026

Upstream branch: e8c2f9f
series: https://patchwork.kernel.org/project/linux-block/list/?series=1099643
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1099643=>linus-master branch from 0b2ce2a to 68cc3a4 Compare May 26, 2026 16:05
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 27, 2026

Upstream branch: e8c2f9f
series: https://patchwork.kernel.org/project/linux-block/list/?series=1099643
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1099643=>linus-master branch from 68cc3a4 to 623e7b6 Compare May 27, 2026 12:21
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 86d8d37 to 9805659 Compare May 28, 2026 13:24
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 28, 2026

Upstream branch: eb3f4b7
series: https://patchwork.kernel.org/project/linux-block/list/?series=1099643
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1099643=>linus-master branch from 623e7b6 to f234b0c Compare May 28, 2026 14:15
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 9805659 to 3f4a345 Compare May 29, 2026 11:12
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 29, 2026

Upstream branch: 8fde5d1
series: https://patchwork.kernel.org/project/linux-block/list/?series=1099643
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1099643=>linus-master branch from f234b0c to 5319ac4 Compare May 29, 2026 11:41
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 3f4a345 to c6dc343 Compare June 1, 2026 08:57
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Jun 1, 2026

Upstream branch: e43ffb6
series: https://patchwork.kernel.org/project/linux-block/list/?series=1099643
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1099643=>linus-master branch from 5319ac4 to 3785d8d Compare June 1, 2026 09:34
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from c6dc343 to fc36596 Compare June 3, 2026 13:56
bdev_mark_dead()'s @surprise == true means the device is already gone.
The filesystem callback fs_bdev_mark_dead() honours this and skips
sync_filesystem(), but the bare block device path (no ->mark_dead op)
lost its !surprise guard when the holder ->mark_dead callback was wired
up (see Fixes), and now calls sync_blockdev() unconditionally, which can
hang forever waiting on writeback that can no longer complete.

syzkaller 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) -> sync_blockdev() blocks in
folio_wait_writeback(), wedging the reset worker and every task waiting
on it.

Skip the sync on surprise removal, matching fs_bdev_mark_dead();
invalidate_bdev() still runs. Orderly removal (surprise == false) is
unchanged.

Fixes: d8530de ("block: call into the file system for bdev_mark_dead")
Found by FuzzNvme(Syzkaller with FEMU fuzzing framework).
Acked-by: Sungwoo Kim <iam@sung-woo.kim>
Acked-by: Dave Tian <daveti@purdue.edu>
Acked-by: Weidong Zhu <weizhu@fiu.edu>
Signed-off-by: Chao Shi <coshi036@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christian Brauner <brauner@kernel.org>
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Jun 3, 2026

Upstream branch: ba3e43a
series: https://patchwork.kernel.org/project/linux-block/list/?series=1099643
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1099643=>linus-master branch from 3785d8d to 9a2b1cb Compare June 3, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant