Jonathan Brassow 90584fc93d MD: Prevent sysfs operations on uninitialized kobjects
MD: Prevent sysfs operations on uninitialized kobjects

Device-mapper does not use sysfs; but when device-mapper is leveraging
MD's RAID personalities, MD sometimes attempts to update sysfs.  This
patch adds checks for 'mddev-kobj.sd' in sysfs_[un]link_rdev to ensure
it is about to operate on something valid.  This patch also checks for
'mddev->kobj.sd' before calling 'sysfs_notify' in 'remove_and_add_spares'.
Although 'sysfs_notify' already makes this check, doing so in
'remove_and_add_spares' prevents an additional mutex operation.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2013-03-20 13:17:57 +11:00
..
2012-03-28 18:41:29 +01:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:36 +00:00
2012-12-21 20:23:41 +00:00
2012-07-30 17:25:16 -07:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:38 +00:00
2012-12-21 20:23:41 +00:00
2013-01-31 14:11:14 +00:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:41 +00:00
2013-01-31 14:23:36 +00:00
2012-12-21 20:23:38 +00:00
2012-10-22 10:44:55 +11:00
2013-02-28 09:08:34 +11:00
2012-10-11 13:08:44 +11:00
2012-10-11 13:49:05 +11:00