Skip to content

dm: fix infinite loop in dm_blk_do_report_zones() - #1468

Open
ghost wants to merge 1 commit into
linus-master_basefrom
series/1189208=>linus-master
Open

ghost wants to merge 1 commit into
linus-master_basefrom
series/1189208=>linus-master

Conversation

@ghost

@ghost ghost commented Oct 19, 2026

Copy link
Copy Markdown

Pull request for series with
subject: dm: fix infinite loop in dm_blk_do_report_zones()
version: 1
url: https://patchwork.kernel.org/series/1189208/

@ghost

ghost commented Oct 19, 2026

Copy link
Copy Markdown
Author

Upstream branch: c03c1a1
series: https://patchwork.kernel.org/series/1189208/
version: 1

@ghost

ghost commented Oct 22, 2026

Copy link
Copy Markdown
Author

Upstream branch: 7be4bc5
series: https://patchwork.kernel.org/series/1189208/
version: 1

@ghost
ghost force-pushed the series/1189208=>linus-master branch from 9113d28 to 114cf76 Compare October 22, 2026 07:35
@ghost

ghost commented Oct 22, 2026

Copy link
Copy Markdown
Author

Upstream branch: 7be4bc5
series: https://patchwork.kernel.org/series/1189208/
version: 1

@ghost
ghost force-pushed the series/1189208=>linus-master branch from 114cf76 to 206ad0c Compare October 22, 2026 08:32
@ghost
ghost force-pushed the linus-master_base branch from 435b194 to fd67522 Compare October 24, 2026 03:36
@ghost

ghost commented Oct 24, 2026

Copy link
Copy Markdown
Author

Upstream branch: 17bb0e2
series: https://patchwork.kernel.org/series/1189208/
version: 1

@ghost
ghost force-pushed the series/1189208=>linus-master branch from 206ad0c to 8efc49d Compare October 24, 2026 03:51
@ghost
ghost force-pushed the linus-master_base branch from fd67522 to 3b53a63 Compare October 26, 2026 01:52
@ghost

ghost commented Oct 26, 2026

Copy link
Copy Markdown
Author

Upstream branch: 21a7f44
series: https://patchwork.kernel.org/series/1189208/
version: 1

@ghost
ghost force-pushed the series/1189208=>linus-master branch from 8efc49d to 55b040f Compare October 26, 2026 02:14
@ghost
ghost force-pushed the linus-master_base branch from 3b53a63 to 5d84576 Compare October 26, 2026 07:01
@ghost

ghost commented Oct 26, 2026

Copy link
Copy Markdown
Author

Upstream branch: 6b4b543
series: https://patchwork.kernel.org/series/1189208/
version: 1

@ghost
ghost force-pushed the series/1189208=>linus-master branch from 55b040f to bcac38c Compare October 26, 2026 07:19
@ghost
ghost force-pushed the linus-master_base branch from 5d84576 to 6582ed2 Compare October 26, 2026 18:11
@ghost

ghost commented Oct 26, 2026

Copy link
Copy Markdown
Author

Upstream branch: fb2c3f4
series: https://patchwork.kernel.org/series/1189208/
version: 1

@ghost
ghost force-pushed the series/1189208=>linus-master branch from bcac38c to 226a9ad Compare October 26, 2026 18:23
@ghost
ghost force-pushed the linus-master_base branch from 6582ed2 to b3a1abc Compare October 26, 2026 23:55
@ghost

ghost commented Oct 27, 2026

Copy link
Copy Markdown
Author

Upstream branch: d135ab4
series: https://patchwork.kernel.org/series/1189208/
version: 1

@ghost
ghost force-pushed the series/1189208=>linus-master branch from 226a9ad to 734718b Compare October 27, 2026 00:08
@ghost
ghost force-pushed the linus-master_base branch from b3a1abc to 712496f Compare October 28, 2026 23:34
@ghost

ghost commented Oct 28, 2026

Copy link
Copy Markdown
Author

Upstream branch: c339f40
series: https://patchwork.kernel.org/series/1189208/
version: 1

@ghost
ghost force-pushed the series/1189208=>linus-master branch from 734718b to fd30c0d Compare October 28, 2026 23:53
@ghost
ghost force-pushed the linus-master_base branch from 712496f to a186880 Compare October 30, 2026 13:52
@ghost

ghost commented Oct 30, 2026

Copy link
Copy Markdown
Author

Upstream branch: d89e1d1
series: https://patchwork.kernel.org/series/1189208/
version: 1

@ghost
ghost force-pushed the series/1189208=>linus-master branch from fd30c0d to c15fc5c Compare October 30, 2026 14:16
@ghost
ghost force-pushed the linus-master_base branch from a186880 to 46206a3 Compare November 2, 2026 17:14
@ghost

ghost commented Nov 2, 2026

Copy link
Copy Markdown
Author

Upstream branch: 6628e7d
series: https://patchwork.kernel.org/series/1189208/
version: 1

@ghost
ghost force-pushed the series/1189208=>linus-master branch from c15fc5c to 988e27f Compare November 2, 2026 17:55
@ghost
ghost force-pushed the linus-master_base branch from 46206a3 to 220bd96 Compare November 3, 2026 23:41
@ghost

ghost commented Nov 4, 2026

Copy link
Copy Markdown
Author

Upstream branch: 05441d6
series: https://patchwork.kernel.org/series/1189208/
version: 1

@ghost
ghost force-pushed the series/1189208=>linus-master branch from 988e27f to e918db0 Compare November 4, 2026 00:09
@ghost
ghost force-pushed the linus-master_base branch from 220bd96 to 6c4625e Compare November 6, 2026 08:02
@ghost

ghost commented Nov 6, 2026

Copy link
Copy Markdown
Author

Upstream branch: f66469d
series: https://patchwork.kernel.org/series/1189208/
version: 1

@ghost
ghost force-pushed the series/1189208=>linus-master branch from e918db0 to 97eef97 Compare November 6, 2026 08:49
@ghost
ghost force-pushed the linus-master_base branch from 6c4625e to c7f678d Compare November 7, 2026 03:08
@ghost

ghost commented Nov 7, 2026

Copy link
Copy Markdown
Author

Upstream branch: d487237
series: https://patchwork.kernel.org/series/1189208/
version: 1

@ghost
ghost force-pushed the series/1189208=>linus-master branch from 97eef97 to 8ade916 Compare November 7, 2026 03:45
@ghost
ghost force-pushed the linus-master_base branch from c7f678d to 6aa6cd1 Compare November 10, 2026 07:53
If the device underlying a zoned target is removed, its capacity is set
to 0 and blkdev_report_zones() returns 0 without reporting any zones.
The mapped device keeps its old capacity, so args->zone_idx and
args->next_sector never advance and dm_blk_do_report_zones() loops
forever. On non-preemptible kernels this causes soft lockups and RCU
stalls.

The following sequence of commands triggers the hang:

modprobe scsi_debug zbc=managed dev_size_mb=1024 zone_size_mb=64
udevadm settle
echo '0 2097152 linear /dev/sda 0' | dmsetup create lin
echo 1 > /sys/block/sda/device/delete
blkzone report -o 0 -c 1 /dev/mapper/lin

Fix this by returning -EIO when a target reports no zones. The target
always maps args->next_sector, so a zero return means the underlying
device no longer covers that sector.

Fixes: d410035 ("block: rework zone reporting")
Cc: stable@vger.kernel.org
Signed-off-by: Mark Bundschuh <mkbund@amazon.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
@ghost

ghost commented Nov 10, 2026

Copy link
Copy Markdown
Author

Upstream branch: b3dfbde
series: https://patchwork.kernel.org/series/1189208/
version: 1

@ghost
ghost force-pushed the series/1189208=>linus-master branch from 8ade916 to fc06fff Compare November 10, 2026 08:17
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