s390/tape: Use del_timer_sync()
authorThomas Gleixner <tglx@linutronix.de>
Sun, 23 Mar 2014 15:09:24 +0000 (15:09 +0000)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 1 Apr 2014 07:23:36 +0000 (09:23 +0200)
del_timer() does not wait for a possible running callback to
complete. So the call side might free request and the associated
objects while on another cpu the timer handler runs.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/tape_std.c

index 981a99fd8d4285c2b443f81a320c48f8826871cf..cf577a2b13ace9a62231d1720286ec0cdad02d13 100644 (file)
@@ -78,7 +78,7 @@ tape_std_assign(struct tape_device *device)
 
        rc = tape_do_io_interruptible(device, request);
 
-       del_timer(&timeout);
+       del_timer_sync(&timeout);
 
        if (rc != 0) {
                DBF_EVENT(3, "%08x: assign failed - device might be busy\n",