mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 17:51:57 +09:00
MD: Add del_timer_sync to mddev_suspend (fix nasty panic)
commit 0d9f4f135e upstream.
Use del_timer_sync to remove timer before mddev_suspend finishes.
We don't want a timer going off after an mddev_suspend is called. This is
especially true with device-mapper, since it can call the destructor function
immediately following a suspend. This results in the removal (kfree) of the
structures upon which the timer depends - resulting in a very ugly panic.
Therefore, we add a del_timer_sync to mddev_suspend to prevent this.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
04a4aeb405
commit
f4f388bce9
@@ -348,6 +348,8 @@ void mddev_suspend(mddev_t *mddev)
|
||||
synchronize_rcu();
|
||||
wait_event(mddev->sb_wait, atomic_read(&mddev->active_io) == 0);
|
||||
mddev->pers->quiesce(mddev, 1);
|
||||
|
||||
del_timer_sync(&mddev->safemode_timer);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mddev_suspend);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user