]> 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>
Tue, 9 Aug 2011 03:01:28 +0000 (13:01 +1000)
commit8023f16b3eb111a94fa39965d5bc3f8808812a42
tree82ac75af8aea1298859027a44608ea08bc21a5df
parent698906664881db8f97970e51b132b56473cd04e5
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