multipath: fix segfault with disable_changed_wwids
authorBenjamin Marzinski <bmarzins@redhat.com>
Fri, 7 Apr 2017 06:16:38 +0000 (01:16 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 12 Apr 2017 07:28:02 +0000 (09:28 +0200)
When a path wwid changes, uev_update_path was dereferencing pp->mpp
without checking if it was NULL.

Cc: Shichangkuo <shi.changkuo@h3c.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
multipathd/main.c

index 995e580..0c61caa 100644 (file)
@@ -1002,7 +1002,8 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
                                if (!pp->wwid_changed) {
                                        pp->wwid_changed = 1;
                                        pp->tick = 1;
-                                       dm_fail_path(pp->mpp->alias, pp->dev_t);
+                                       if (pp->mpp)
+                                               dm_fail_path(pp->mpp->alias, pp->dev_t);
                                }
                                goto out;
                        } else