https://github.com/torvalds/linux
Revision 44fbbb3dc687c9709a6f2236197316e5c79ab1eb authored by Al Viro on 30 April 2012, 22:24:46 UTC, committed by Al Viro on 01 June 2012, 17:01:51 UTC
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: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 29bf5dd
History
Tip revision: 44fbbb3dc687c9709a6f2236197316e5c79ab1eb authored by Al Viro on 30 April 2012, 22:24:46 UTC
x86: get rid of calling do_notify_resume() when returning to kernel mode
Tip revision: 44fbbb3
File Mode Size
Makefile -rw-r--r-- 394 bytes
compat.c -rw-r--r-- 18.3 KB
compat_mq.c -rw-r--r-- 4.1 KB
ipc_sysctl.c -rw-r--r-- 6.0 KB
ipcns_notifier.c -rw-r--r-- 2.2 KB
mq_sysctl.c -rw-r--r-- 2.7 KB
mqueue.c -rw-r--r-- 35.6 KB
msg.c -rw-r--r-- 20.9 KB
msgutil.c -rw-r--r-- 2.7 KB
namespace.c -rw-r--r-- 4.3 KB
sem.c -rw-r--r-- 42.1 KB
shm.c -rw-r--r-- 29.2 KB
syscall.c -rw-r--r-- 2.3 KB
util.c -rw-r--r-- 22.8 KB
util.h -rw-r--r-- 5.3 KB

back to top