• Al Viro's avatar
    ext4: fix del_timer() misuse for ->s_err_report · f09946da
    Al Viro authored
    commit 9105bb14 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: default avatarAl Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
    [bwh: Backported to 3.2: adjust context]
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
    f09946da
super.c 144 KB