]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Always assume SKIP_GONE_DEVS behaviour and kill the flag
authorDan Williams <dan.j.williams@intel.com>
Thu, 17 Jun 2010 00:26:04 +0000 (17:26 -0700)
committerDan Williams <dan.j.williams@intel.com>
Thu, 17 Jun 2010 00:26:04 +0000 (17:26 -0700)
commitb526e52dc7cbdde98db9c9f8765be28ba6d71d78
treec9c303fc940a4da78996d26f829271913fe8b730
parentfd547b508c90a647cf60df678047f07046cf5c68
Always assume SKIP_GONE_DEVS behaviour and kill the flag

...i.e. GET_DEVS == (GET_DEVS|SKIP_GONE_DEVS)

A null pointer dereference in Incremental.c can be triggered by
replugging a disk while the old name is in use.  When mdadm -I is called
on the new disk we fail the call to sysfs_read().  I audited all the
locations that use GET_DEVS and it appears they can tolerate missing a
drive.  So just make SKIP_GONE_DEVS the default behaviour.

Also fix up remaining unchecked usages of the sysfs_read() return value.

Reported-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Grow.c
Incremental.c
managemon.c
mapfile.c
mdadm.h
mdmon.c
super-ddf.c
super-intel.c
sysfs.c