pathcmp() makes sure that all paths in pgp have a match in cpgp, but not vice-versa. Check the number of paths, too. Fixes: 90773ba ("libmultipath: resolve hash collisions in pgcmp()") Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> --- libmultipath/configure.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libmultipath/configure.c b/libmultipath/configure.c index d0e9c95..55140d0 100644 --- a/libmultipath/configure.c +++ b/libmultipath/configure.c @@ -442,6 +442,7 @@ pgcmp (struct multipath * mpp, struct multipath * cmpp) vector_foreach_slot (cmpp->pg, cpgp, j) { if (pgp->id == cpgp->id && + VECTOR_SIZE(pgp->paths) == VECTOR_SIZE(cpgp->paths) && !pathcmp(pgp, cpgp)) { r = 0; break; -- 2.47.0