[Devel] [PATCH hci-8.2] dm-qcow2: fix a SEEK_DATA/SEEK_HOLE oops on a cluster under allocation
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Nov 30 16:19:58 MSK 2026
Applying with this fix on my side:
- message: "meets a cluster being allocated" -> "meets a cluster
being allocated or discarded".
On Mon, 23 Nov 2026 16:38:05 +0100, Denis V. Lunev wrote:
> no pages, so a SEEK_DATA or SEEK_HOLE on the device that meets a
> cluster being allocated dereferences its NULL bi_io_vec under
> md_pages_lock and oopses.
A discard updates the L2 entry the same way (prepare_cluster_discard()
-> prepare_l_entry_update()), so a seek over a cluster being discarded
oopsed too; the patch covers both.
Separate patches, not needed for this patch. I created a task for it:
1. The same branch of parse_l2() serves a plain read wrongly on an
image with a backing file. A write that allocates a zeroed cluster
(L2_READS_ALL_ZEROES, preallocated or not) puts the new entry
without the zero flag into the L2 page; a read before its writeback
gets zero-filled and returns without data_clu_alloced, so
process_read_qio() takes the cluster as unmapped and reads the
backing image over the zeroes. The guest sees the backing data in a
range it zeroed.
https://virtuozzo.atlassian.net/browse/VSTOR-156741
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
More information about the Devel
mailing list