md: avoid dereferencing NULL pointer when accessing suspend_* sysfs attributes.
commit3c92900d9a4afb176d3de335dc0da0198660a244
authorNeilBrown <neilb@suse.de>
Wed, 1 Jul 2009 01:14:04 +0000 (1 11:14 +1000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Jul 2009 03:38:53 +0000 (19 20:38 -0700)
treedd5ea89ce01a1835b092fed84a613b9d7eb40175
parent042128a85db99144c34a448c75d952cda8b6c19b
md: avoid dereferencing NULL pointer when accessing suspend_* sysfs attributes.

commit b8d966efd9a46a9a35beac50cbff6e30565125ef upstream.

If we try to modify one of the md/ sysfs files
  suspend_lo or suspend_hi
when the array is not active, we dereference a NULL.
Protect against that.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/md.c