• John David Anglin's avatar
    parisc: Avoid calling faulthandler_disabled() twice · 9e9d4b46
    John David Anglin authored
    In handle_interruption(), we call faulthandler_disabled() to check whether the
    fault handler is not disabled. If the fault handler is disabled, we immediately
    call do_page_fault(). It then calls faulthandler_disabled(). If disabled,
    do_page_fault() attempts to fixup the exception by jumping to no_context:
    
    no_context:
    
            if (!user_mode(regs) && fixup_exception(regs)) {
                    return;
            }
    
            parisc_terminate("Bad Address (null pointer deref?)", regs, code, address);
    
    Apart from the error messages, the two blocks of code perform the same
    function.
    
    We can avoid two calls to faulthandler_disabled() by a simple revision
    to the code in handle_interruption().
    
    Note: I didn't try to fix the formatting of this code block.
    Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
    Signed-off-by: default avatarHelge Deller <deller@gmx.de>
    9e9d4b46
traps.c 21.8 KB