]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerNeilBrown <neilb@suse.de>
Thu, 17 May 2012 00:38:24 +0000 (10:38 +1000)
commitc44c1052e320a8ddf9dfc85c1a76e88959af3fb3
tree3d0b8c398c1eda38bac6d3dd6ac1b22b518d26b4
parentd27217e80aa0858f9f4e5feca7210ff4ca81b095
MD: Add del_timer_sync to mddev_suspend (fix nasty panic)

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.

Cc: stable@vger.kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c