]> 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, 3 Aug 2011 00:52:32 +0000 (10:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 24 Aug 2011 05:24:06 +0000 (15:24 +1000)
commitf5591c7474611228642cada0f106ef900b0e4450
treed0b99753fb56630081e0fbec93b176bcc2f00559
parent35192d16ed5e497692d2afa25626433e76378333
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