[Devel] [PATCH hci-8.1 v7 07/10] dm-ploop: fix use-after-free on the last inflight_md decrement
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Nov 17 21:23:02 MSK 2026
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.
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
More information about the Devel
mailing list