• Stefan Haberland's avatar
    [S390] dasd: fix race condition in resume code · 6fca97a9
    Stefan Haberland authored
    There is a race while re-reading the device characteristics. After
    cleaning the memory area a cqr is build which reads the device
    characteristics. This may take a rather long time and the device
    characteristics structure is zero during this. Now it could be
    possible that the block tasklet starts working and a new cqr will be
    build. The build_cp command refers to the device characteristics
    structure and this may lead into a divide by zero exception.
    Fix this by re-reading the device characteristics into a temporary
    structur and copy the data to the original structure. Also take the
    ccwdev_lock.
    Signed-off-by: default avatarStefan Haberland <stefan.haberland@de.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    6fca97a9
dasd.c 70.9 KB