[dm-devel] [PATCH] libmultipath: check if adopt_path() really added current path
Martin Wilck
mwilck at suse.com
Wed Feb 3 08:14:57 UTC 2021
On Wed, 2021-02-03 at 09:33 +0800, lixiaokeng wrote:
>
>
> On 2021/2/3 3:57, mwilck at suse.com wrote:
> > From: Martin Wilck <mwilck at suse.com>
> >
> > The description of 2d32d6f ("libmultipath: adopt_paths(): don't
> > bail out on
> > single path failure") said "we need to check after successful call
> > to
> > adopt_paths() if that specific path had been actually added, and
> > fail in the
> > caller otherwise". But the commit failed to actually implement this
> > check.
> > Instead, it just checked if the path was member of the pathvec,
> > which will
> > almost always be the case.
> >
> > Fix it by checking what actually needs to be checked, membership of
> > the
> > path to be added in mpp->paths.
> >
> > Fixes: 2d32d6f ("libmultipath: adopt_paths(): don't bail out on
> > single path failure")
> > Signed-off-by: Martin Wilck <mwilck at suse.com>
> > ---
> >
> > @lixiaokeng, I believe that this fixes the issue you mentioned in
> > your
> > post "libmultipath: fix NULL dereference in get_be64".
> > Reviewed-by: Lixiaokeng <lixiaokeng at huawei.com>
Is this also a Tested-by:?
IOW, did it fix your issue?
Martin
More information about the dm-devel
mailing list