ext4: fix del_timer() misuse for ->s_err_report
authorAl Viro <viro@ZenIV.linux.org.uk>
Mon, 9 Dec 2013 01:52:31 +0000 (20:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 20:25:10 +0000 (12:25 -0800)
commit89b4fc74a5978d8d226870fff1ea8cd2f7122214
tree538ae539a75bcab0349442bfe03db55a12c5e8c6
parentea214c946ee77588c4313be3e9951edd25d6b270
ext4: fix del_timer() misuse for ->s_err_report

commit 9105bb149bbbc555d2e11ba5166dfe7a24eae09e upstream.

That thing should be del_timer_sync(); consider what happens
if ext4_put_super() call of del_timer() happens to come just as it's
getting run on another CPU.  Since that timer reschedules itself
to run next day, you are pretty much guaranteed that you'll end up
with kfree'd scheduled timer, with usual fun consequences.  AFAICS,
that's -stable fodder all way back to 2010... [the second del_timer_sync()
is almost certainly not needed, but it doesn't hurt either]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/super.c