Skip to content

Commit

Permalink
s390/cio: fix IO subchannel event race
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Sep 6, 2012
1 parent 1f08be8 commit 43d0be7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/s390/cio/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 43d0be7

Please sign in to comment.