• Sebastian Ott's avatar
    [S390] cio: fix unreg race in set_online path · 9bf05098
    Sebastian Ott authored
    In ccw_device_set_online we basically start path verification and
    wait for the device to reach a final state. If it turns out that the
    device has no useable path we schedule the deregistration of the
    device (which is still in an non-final state) and wake up the waiting
    process. The deregistration process will set a final state, but if
    the wake up happens to be prior to this, the device will hang forever
    in ccw_device_set_online.
    
    To fix this just set the final NOT_OPER state prior to the scheduled
    deregistration of the device.
    Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    9bf05098
device_fsm.c 30.3 KB