• Martin Schwidefsky's avatar
    s390: fix floating pointer register corruption (again) · e370e476
    Martin Schwidefsky authored
    There is a tricky interaction between the machine check handler
    and the critical sections of load_fpu_regs and save_fpu_regs
    functions. If the machine check interrupts one of the two
    functions the critical section cleanup will complete the function
    before the machine check handler s390_do_machine_check is called.
    Trouble is that the machine check handler needs to validate the
    floating point registers *before* and not *after* the completion
    of load_fpu_regs/save_fpu_regs.
    
    The simplest solution is to rewind the PSW to the start of the
    load_fpu_regs/save_fpu_regs and retry the function after the
    return from the machine check handler.
    Tested-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
    Cc: <stable@vger.kernel.org> # 4.3+
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    e370e476
entry.S 32.9 KB