[Devel] [PATCH hci-8.1 v7 07/10] dm-ploop: fix use-after-free on the last inflight_md decrement

Alexander Ivanov alexander.ivanov at virtuozzo.com
Wed Nov 18 11:47:33 MSK 2026


On 11/17/26 19:23, Konstantin Khorenko wrote:
> I won't apply this version, please send v8 with the changes below.
>
> On Tue, 17 Nov 2026 18:17:41 +0100, Alexander Ivanov wrote:
>> +/*
>> + * Waiters do not act on zero inflight_md without holding inflight_md_wq.lock,
>> + * so the ploop stays valid while we hold it. Once we drop it, the ploop may
>> + * be freed, so this must be the last access to it.
>> + */
> Item 5 of the cover letter reply: the wait added to ploop_postsuspend()
> in 9/10 acts on zero without the lock. It is safe because
> ploop_destroy(), the only place that frees the ploop, takes the lock;
> the comment should say that. Item 8: Fixes: d1a1e5108aeb.
Fixed.


More information about the Devel mailing list