• Al Viro's avatar
    x86: get rid of calling do_notify_resume() when returning to kernel mode · 44fbbb3d
    Al Viro authored
    If we end up calling do_notify_resume() with !user_mode(refs), it
    does nothing (do_signal() explicitly bails out and we can't get there
    with TIF_NOTIFY_RESUME in such situations).  Then we jump to
    resume_userspace_sig, which rechecks the same thing and bails out
    to resume_kernel, thus breaking the loop.
    
    It's easier and cheaper to check *before* calling do_notify_resume()
    and bail out to resume_kernel immediately.  And kill the check in
    do_signal()...
    
    Note that on amd64 we can't get there with !user_mode() at all - asm
    glue takes care of that.
    Acked-and-reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    44fbbb3d
entry_32.S 31.7 KB