[Devel] [PATCH hci-8.2] dm-ploop: fix image I/O completions running on a freed ploop
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Thu Nov 19 01:32:49 MSK 2026
> From: Denis V. Lunev <den at openvz.org>
>
> Nothing keeps the struct ploop alive while an image file I/O completion
> runs. When that completion ends the last request, dm drops its md
> reference, and suspend and ploop_destroy() wait for neither:
>
> - a write split at a cluster boundary: the last split pio to complete
> ends the parent request, then frees itself into ploop->pio_pool;
> - a write that allocated a cluster: ploop_bat_write_finish() ends the
> data pios, then ploop_put_piwb() decrements inflight_md and frees the
> piwb pio into ploop->pio_pool.
>
> Both run in the completion context of the backing file system, such as
> the dio workqueue that converts unwritten extents, which ploop does not
> own. A dmsetup remove in that window ends in a general protection fault
> [ ... ]
> https://virtuozzo.atlassian.net/browse/VSTOR-155932
>
> Fixes: 6ddad5a4d226 ("dm-ploop: Add ploop target driver")
> Feature: dm-ploop: ploop target driver
> Signed-off-by: Denis V. Lunev <den at openvz.org>
Sashiko has reviewed this patch and found no issues.
Carry the trailer below into the next revision and Sashiko will not review this patch again.
Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261118222702.3878760-1-den@openvz.org?part=1
More information about the Devel
mailing list