]> git.karo-electronics.de Git - karo-tx-linux.git/commit
When no floppy is found the module code can be released while a timer
authorCarsten Emde <C.Emde@osadl.org>
Wed, 24 Aug 2011 23:46:13 +0000 (09:46 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 5 Sep 2011 07:02:07 +0000 (17:02 +1000)
commitae58138e66fbe0d7593b971039ffce9e237a496d
tree95e885d81341a51c6db0570f506f67c4a64acab5
parent415f943d03a17e0b943584443fdf1a77b173e626
When no floppy is found the module code can be released while a timer
function is pending or about to be executed.

CPU0                                  CPU1
      floppy_init()
timer_softirq()
   spin_lock_irq(&base->lock);
   detach_timer();
   spin_unlock_irq(&base->lock);
   -> Interrupt
del_timer();
        return -ENODEV;
                                      module_cleanup();
   <- EOI
   call_timer_fn();
   OOPS

Use del_timer_sync() to prevent this.

Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/floppy.c