context_tracking: Restore previous state in schedule_user
authorAndy Lutomirski <[email protected]>
Wed, 3 Dec 2014 23:37:08 +0000 (15:37 -0800)
committerLinus Torvalds <[email protected]>
Thu, 4 Dec 2014 04:55:58 +0000 (20:55 -0800)
commit7cc78f8fa02c2485104b86434acbc1538a3bd807
treef3a9fdccb6f2c4db996299fe23f6597592b30085
parentebcd241a635c868b1f89abbfb4dd176ca5f81eba
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 <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Frédéric Weisbecker <[email protected]>
Acked-by: Paul E. McKenney <[email protected]>
Signed-off-by: Andy Lutomirski <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/sched/core.c