]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Detail: Avoid dereferencing some NULL pointers.
authorNeilBrown <neilb@suse.de>
Wed, 6 Aug 2014 05:56:12 +0000 (15:56 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 6 Aug 2014 05:56:12 +0000 (15:56 +1000)
commitc9f1cbc050eb52c058199c570864109afa0f1489
treedc0a07a3351be1648d27514185cee2b07b79e5bf
parentd13566f9b6ff8377f45cd025a1cd1a58bcb4e857
Detail: Avoid dereferencing some NULL pointers.

dm devices which only have a single underlying md device
will respond to md ioctls  as though they were that md device.
This can confuse mdadm and lead it to violating its segments.

So add tests for NULL where appropriate.  You might not get exactly
the right answer when you "mdadm -D" a dm device, but at least it won't
crash now.

Reported-by: Willy Weisz <Willy.Weisz@univie.ac.at>
Resolves: https://bugzilla.novell.com/show_bug.cgi?id=887821
Signed-off-by: NeilBrown <neilb@suse.de>
Detail.c