• Stefan Weinhuber's avatar
    [S390] dasd: fix race in dasd timer handling · 48cae885
    Stefan Weinhuber authored
    In dasd_device_set_timer and dasd_block_set_timer we interpret the
    return value of mod_timer in a wrong way. If the timer expires in
    the small window between our check of timer_pending and the call to
    mod_timer, then the timer will be set, mod_timer returns zero and
    we will call add_timer for a timer that is already pending.
    As del_timer and mod_timer do all the necessary checking themselves,
    we can simplify our code and remove the race a the same time.
    Signed-off-by: default avatarStefan Weinhuber <wein@de.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    48cae885
dasd.c 66.5 KB