|
@@ -2874,10 +2874,14 @@ asmlinkage __visible void __sched schedule_user(void)
|
|
|
* or we have been woken up remotely but the IPI has not yet arrived,
|
|
|
* we haven't yet exited the RCU idle mode. Do it here manually until
|
|
|
* we find a better solution.
|
|
|
+ *
|
|
|
+ * NB: There are buggy callers of this function. Ideally we
|
|
|
+ * should warn if prev_state != IN_USER, but that will trigger
|
|
|
+ * too frequently to make sense yet.
|
|
|
*/
|
|
|
- user_exit();
|
|
|
+ enum ctx_state prev_state = exception_enter();
|
|
|
schedule();
|
|
|
- user_enter();
|
|
|
+ exception_exit(prev_state);
|
|
|
}
|
|
|
#endif
|
|
|
|