• H. Peter Anvin's avatar
    x86: prioritize the FPU traps for the error code · adf77bac
    H. Peter Anvin authored
    In the case of multiple FPU errors, prioritize the error codes,
    instead of returning __SI_FAULT, which ends up pushing a 0 as the
    error code to userspace, a POSIX violation.
    
    For i386, we will simply return if there are no errors at all; for
    x86-64 this is probably a "can't happen" (and the code should be
    unified), but for this patch, return __SI_FAULT|SI_KERNEL if this ever
    happens.
    Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
    adf77bac
traps.c 25.1 KB