[Devel] [PATCH hci-8.2] dm-ploop: fix an ENOSPC endio arming the timer on a freed ploop

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Wed Nov 18 22:05:48 MSK 2026


Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] dm-ploop: commit message overstates that ploop is not touched
  after unlock
--

commit c20cb19ac7026c7127a0f474371e642c3aa24b0b
Author: Denis V. Lunev <den at openvz.org>

dm-ploop: fix an ENOSPC endio arming the timer on a freed ploop

The commit takes deferred_lock before the wants_suspend test in ploop_try_delay_enospc() and holds it through mod_timer() and schedule_work(). The aim is to stop the endio from touching a freed struct ploop after the pio is queued on enospc_pios.

> Hold deferred_lock from the wants_suspend test through schedule_work().
> ploop_presuspend() sets wants_suspend under the same lock, so either it
> finds the pio on enospc_pios with the timer and the work already armed,
> or the endio sees wants_suspend and leaves the request to its caller to
> complete. The endio does not touch the struct ploop after the unlock.

[Severity: Low]
Is the last sentence accurate? On the wants_suspend path, the patch drops the lock and then calls PL_WARN("dropping pio enospc\n"). PL_WARN() reads ploop->ti->table through ploop_device_name(), so struct ploop is still touched after the unlock.

This looks harmless, because no pio was queued on that path and the caller still holds the uncompleted request. The claim holds only on the path that returns true. Either move the PL_WARN() before the unlock, or limit the sentence to the case where the pio was queued.

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/20261118190006.3573492-1-den@openvz.org?part=1



More information about the Devel mailing list