Skip to content

Commit

Permalink
[PATCH] s390: tape operation abortion leads to panic
Browse files Browse the repository at this point in the history
When a request is aborted because of a signal, we currently stop the request
via csh, but we do not wait for the interrupt of csh in any case.  We free the
request structure and therefore when the interrupt for the csh operation is
presented, the request object is no longer valid and an invalid callback
pointer is used.

To fix this wait until the interrupt for csh arrives and until
wait_event_interruptible() does not return -ERESTARTSYS.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Michael Holzheu authored and Linus Torvalds committed Mar 24, 2006
1 parent 842d3fb commit 4cd190a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/s390/char/tape_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ tape_do_io_interruptible(struct tape_device *device,
wq,
(request->callback == NULL)
);
} while (rc != -ERESTARTSYS);
} while (rc == -ERESTARTSYS);

DBF_EVENT(3, "IO stopped on %08x\n", device->cdev_id);
rc = -ERESTARTSYS;
Expand Down

0 comments on commit 4cd190a

Please sign in to comment.