[Devel] [PATCH hci-8.1 2/2] dm-ploop: fix flip_upper_deltas walking past the BAT of the lower delta

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Thu Nov 5 00:50:44 MSK 2026


> From: Denis V. Lunev <den at openvz.org>
> 
> ploop_check_delta_before_flip() walks the live BAT pages together with
> the BAT pages of the lower delta, and means to stop at the page that
> holds the last entry of the lower delta. It takes that entry from i
> after the scan of the page, when i is already one past end, so the stop
> never matches. Once the live BAT has more pages than the lower delta, as
> after a grow of the device, the walk runs off the md tree of the lower
> delta and dereferences a NULL page: the flip oopses. The reverse merge
> of the ploop library grows the lower delta to the size of the top before
> it flips, so only a flip outside the library gets there.
> 
> Take the last entry of the page from end.
> 
> Fixes: 6ddad5a4d226 ("dm-ploop: Add ploop target driver")
> https://virtuozzo.atlassian.net/browse/VSTOR-153445
> 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. It looks great!

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261104214635.2063009-1-den@openvz.org?part=2




More information about the Devel mailing list