fix: incremental on invalid container causes segfault
counterpart of 417f346ee0
for incremental.
If md device has metadata_version="none" super_by_fd() matches
supertype=super0.
Call of load_container() dereferences null, so we have to forbid it.
Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
9376b5aac2
commit
a92b211229
|
@ -134,7 +134,7 @@ int Incremental(char *devname, int verbose, int runstop,
|
|||
if (must_be_container(dfd)) {
|
||||
if (!st)
|
||||
st = super_by_fd(dfd, NULL);
|
||||
if (st)
|
||||
if (st && st->ss->load_container)
|
||||
rv = st->ss->load_container(st, dfd, NULL);
|
||||
|
||||
close(dfd);
|
||||
|
|
Loading…
Reference in New Issue