]> 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>
Mon, 15 Aug 2011 04:44:05 +0000 (14:44 +1000)
commite0adc25d48fc03aea398230b55b515b158213b81
treecf630d9f9d6991b71ee8ef884c8e89ff5486424c
parent48f801a409a9a5e18c397d2cb92b035a799192c3
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