After check_path_wwid_change() grabbed a new copy of the wwid, it was stripping trailing whitespace off of pp->wwid, instead of the copy it just got. Fixes: 4660cff ("multipathd: add recheck_wwid option to verify the path wwid") Reviewed-by: Martin Wilck <mwilck@xxxxxxxx> Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx> --- multipathd/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c index 5eefa475..f4910403 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -1025,9 +1025,9 @@ check_path_wwid_change(struct path *pp) } /*Strip any trailing blanks */ - for (i = strlen(pp->wwid); i > 0 && pp->wwid[i-1] == ' '; i--); + for (i = strlen(wwid); i > 0 && wwid[i-1] == ' '; i--); /* no-op */ - pp->wwid[i] = '\0'; + wwid[i] = '\0'; condlog(4, "%s: Got wwid %s by sgio", pp->dev, wwid); if (strncmp(wwid, pp->wwid, WWID_SIZE)) { -- 2.45.0