]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
config: conf_match should ignore devname when not set.
authorNeilBrown <neilb@suse.de>
Thu, 16 Feb 2012 03:11:57 +0000 (14:11 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 16 Feb 2012 03:11:57 +0000 (14:11 +1100)
mapfile:RebuildMap calls conf_match with no devname, so we must be
careful not to use it.

Reported-by: Arkadiusz Miƛkiewicz <arekm@maven.pl>
Signed-off-by: NeilBrown <neilb@suse.de>
config.c

index 6027b2f321e9a17a18e24cdaa5dbcb4fcb49bf81..d8f48e132455ce4b6fd8d7853ffa88a795329a18 100644 (file)
--- a/config.c
+++ b/config.c
@@ -1045,7 +1045,7 @@ struct mddev_ident *conf_match(struct supertype *st,
                                        array_list->devname);
                        continue;
                }
-               if (array_list->devices &&
+               if (array_list->devices && devname &&
                    !match_oneof(array_list->devices, devname)) {
                        if (verbose >= 2 && array_list->devname)
                                fprintf(stderr, Name