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>
This commit is contained in:
parent
8cfa7b0f67
commit
654e8b5abc
@ -1031,7 +1031,7 @@ static int raid1_spare_active(mddev_t *mddev)
|
|||||||
&& !test_bit(Faulty, &rdev->flags)
|
&& !test_bit(Faulty, &rdev->flags)
|
||||||
&& !test_and_set_bit(In_sync, &rdev->flags)) {
|
&& !test_and_set_bit(In_sync, &rdev->flags)) {
|
||||||
count++;
|
count++;
|
||||||
sysfs_notify_dirent(rdev->sysfs_state);
|
sysfs_notify_dirent_safe(rdev->sysfs_state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
spin_lock_irqsave(&conf->device_lock, flags);
|
spin_lock_irqsave(&conf->device_lock, flags);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user