Monitor: check spare group is non-NULL before adding to domain list
... otherwise we crash. Reported-by: "Labun, Marcin" <Marcin.Labun@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
2cda7640f9
commit
062dc4817d
|
@ -732,7 +732,9 @@ static int move_spare(struct state *from, struct state *to,
|
|||
continue;
|
||||
|
||||
pol = devnum_policy(from->devid[d]);
|
||||
pol_add(&pol, pol_domain, from->spare_group, NULL);
|
||||
if (from->spare_group)
|
||||
pol_add(&pol, pol_domain,
|
||||
from->spare_group, NULL);
|
||||
if (domain_test(domlist, pol, to->metadata->ss->name))
|
||||
dev = from->devid[d];
|
||||
dev_policy_free(pol);
|
||||
|
|
Loading…
Reference in New Issue