diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2012-09-05 14:19:42 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-09-06 10:40:39 +0200 |
commit | 43d0be75af8d05654b88d1da494cf292714fbdec (patch) | |
tree | e95e17c270b88565bc3d91a5d4ac6abf7127399d /drivers | |
parent | 1f08be80bef6f7a3faaa728db836b47ff742f41f (diff) | |
download | linux-3.10-43d0be75af8d05654b88d1da494cf292714fbdec.tar.gz linux-3.10-43d0be75af8d05654b88d1da494cf292714fbdec.tar.bz2 linux-3.10-43d0be75af8d05654b88d1da494cf292714fbdec.zip |
s390/cio: fix IO subchannel event race
If the subchannel event function is called from IRQ context and we
observe that the subchannel in question is gone we flag the attached
device as not operational and schedule the event function to be called
again from process context where the subchannel gets deregistered.
However if the subchannel reappeared at the time the event function
gets called from process context we would do nothing and leave the
device in not operational state. Recognize this case in sch_get_action
and trigger reexamination of the subchannel/device.
Acked-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/cio/device.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index ed25c8740a9..e8e1a108cdf 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c @@ -1426,6 +1426,8 @@ static enum io_sch_action sch_get_action(struct subchannel *sch) return IO_SCH_REPROBE; if (cdev->online) return IO_SCH_VERIFY; + if (cdev->private->state == DEV_STATE_NOT_OPER) + return IO_SCH_UNREG_ATTACH; return IO_SCH_NOP; } |