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
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1014 bytes
.mailmap -rw-r--r-- 4.3 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 92.7 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 207.3 KB
Makefile -rw-r--r-- 46.0 KB
README -rw-r--r-- 17.3 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top