]> 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, 12 Sep 2011 05:27:06 +0000 (15:27 +1000)
commita182747da5dc0f646939c7e7673827cf79dc7eaf
tree29a26c5dc45aeedc6916f0e925ff065b7015e692
parent4fb5f2250f6a7eb7b68e437f4e0a65e3048e471e
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