|
@@ -2309,15 +2309,14 @@ static inline void post_schedule(struct rq *rq)
|
|
asmlinkage __visible void schedule_tail(struct task_struct *prev)
|
|
asmlinkage __visible void schedule_tail(struct task_struct *prev)
|
|
__releases(rq->lock)
|
|
__releases(rq->lock)
|
|
{
|
|
{
|
|
- struct rq *rq = this_rq();
|
|
|
|
|
|
+ struct rq *rq;
|
|
|
|
|
|
|
|
+ /* finish_task_switch() drops rq->lock and enables preemtion */
|
|
|
|
+ preempt_disable();
|
|
|
|
+ rq = this_rq();
|
|
finish_task_switch(rq, prev);
|
|
finish_task_switch(rq, prev);
|
|
-
|
|
|
|
- /*
|
|
|
|
- * FIXME: do we need to worry about rq being invalidated by the
|
|
|
|
- * task_switch?
|
|
|
|
- */
|
|
|
|
post_schedule(rq);
|
|
post_schedule(rq);
|
|
|
|
+ preempt_enable();
|
|
|
|
|
|
if (current->set_child_tid)
|
|
if (current->set_child_tid)
|
|
put_user(task_pid_vnr(current), current->set_child_tid);
|
|
put_user(task_pid_vnr(current), current->set_child_tid);
|