MD: Add del_timer_sync to mddev_suspend (fix nasty panic)
authorJonathan Brassow <jbrassow@redhat.com>
Wed, 16 May 2012 09:06:14 +0000 (04:06 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 20 May 2012 21:56:50 +0000 (22:56 +0100)
commitad87af4331c0b242788fbf668eefe2e311f2cd7f
tree00280253e556509386c1797135f3b815296c8814
parente3b9dca169250b65f4dbe2460bcf7efe7098f1b7
MD: Add del_timer_sync to mddev_suspend (fix nasty panic)

commit 0d9f4f135eb6dea06bdcb7065b1e4ff78274a5e9 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: Ben Hutchings <ben@decadent.org.uk>
drivers/md/md.c