context_tracking: Restore previous state in schedule_user

It appears that some SCHEDULE_USER (asm for schedule_user) callers
in arch/x86/kernel/entry_64.S are called from RCU kernel context,
and schedule_user will return in RCU user context.  This causes RCU
warnings and possible failures.

This is intended to be a minimal fix suitable for 3.18.

Reported-and-tested-by: Dave Jones <>
Cc: Oleg Nesterov <>
Cc: Frédéric Weisbecker <>
Acked-by: Paul E. McKenney <>
Signed-off-by: Andy Lutomirski <>
Signed-off-by: Linus Torvalds <>
1 file changed