On Fri, 2025-12-19 at 23:19 -0500, Benjamin Marzinski wrote:
> On Fri, Dec 19, 2025 at 03:40:55PM +0100, Martin Wilck wrote:
> > Paths belong to the pathvec and should be freed from it.
> > Use cleanup_multipath() instead of cleanup_multipath_and_paths(),
> > and free the paths via the pathvec instead.
> > 
> 
> I don't know if this matters, but until you stop free_multipaths()
> from
> clearing pp->mpp in patch 15/26, this will temporarily cause UAF
> errors,
> since you free the paths from the pathvec first, and then attempt to
> reset their pp->mpp value in free_multipaths() later.
> 
> You could avoid the temporary problem by moving the pathvec
> definition
> before the mpp definition, since cleanup functions are run in reverse
> order of their declaration.
> 
> But after applying patch 15/26, this is fine, so
> Reviewed-by: Benjamin Marzinski <[email protected]>

Thanks for pointing this out. I will move 13 after 14, 15.

Martin

Reply via email to