Assemble: fix handling of empty container
# mdadm --create /dev/md/ddf /dev/sd[b-e] -n 4 -e ddf mdadm: container /dev/md/ddf prepared. # mdadm -Ss mdadm: stopped /dev/md126 # mdadm -As mdadm: Container /dev/md/ddf0 has been assembled with 4 drives Segmentation fault Reported-by: Artur Wojcik <artur.wojcik@intel.com> Reported-by: Jacek Danecki <jacek.danecki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
7e8545e954
commit
3ef383aa96
|
@ -320,6 +320,8 @@ int Assemble(struct supertype *st, char *mddev,
|
|||
content = tmpdev->content;
|
||||
else
|
||||
content = tst->ss->container_content(tst);
|
||||
if (!content)
|
||||
goto loop; /* empty container */
|
||||
|
||||
tmpdev->content = content->next;
|
||||
if (tmpdev->content == NULL)
|
||||
|
|
Loading…
Reference in New Issue