summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorJonathan Brassow <jbrassow@redhat.com>2011-07-27 03:00:36 +0200
committerNeilBrown <neilb@suse.de>2011-07-27 03:00:36 +0200
commit654e8b5abc0a793f0c029128db6e4804691a383e (patch)
tree536950fcc8c418c8716ba152e439fe86d24f3365 /drivers/md/raid1.c
parentmd/raid5: Avoid BUG caused by multiple failures. (diff)
downloadlinux-654e8b5abc0a793f0c029128db6e4804691a383e.tar.xz
linux-654e8b5abc0a793f0c029128db6e4804691a383e.zip
MD: raid1 s/sysfs_notify_dirent/sysfs_notify_dirent_safe
If device-mapper creates a RAID1 array that includes devices to be rebuilt, it will deref a NULL pointer when finished because sysfs is not used by device-mapper instantiated RAID devices. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to '')
-rw-r--r--drivers/md/raid1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index a7e69081187f..3cbf0ac2aaad 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1031,7 +1031,7 @@ static int raid1_spare_active(mddev_t *mddev)
&& !test_bit(Faulty, &rdev->flags)
&& !test_and_set_bit(In_sync, &rdev->flags)) {
count++;
- sysfs_notify_dirent(rdev->sysfs_state);
+ sysfs_notify_dirent_safe(rdev->sysfs_state);
}
}
spin_lock_irqsave(&conf->device_lock, flags);