set_cpus_allowed_ptr: don't use rq->migration_thread after unlock
PATCH 1/1 set_cpus_allowed_ptr: don't use rq->migration_thread after unlock
Trivial typo fix. rq->migration_thread can be NULL after task_rq_unlock(), this is why we have "mt" which should be used instead.
Signed-off-by Oleg Nesterov <[email protected]>
---
sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched.c renamed from kernel/sched.c~S_C_A_P_USE_MT +1 -1
@@ -5365,7 +5365,7 @@ int set_cpus_allowed_ptr(struct task_strget_task_struct (mt);task_rq_unlock (rq, &flags); -wake_up_process (rq->migration_thread); +wake_up_process (mt);put_task_struct (mt);wait_for_completion (&req.done);tlb_migrate_finish (p->mm);
Quoted 4 lines · Oleg Nesterov
Trivial typo fix.
rq->migration_threadcan be NULL aftertask_rq_unlock(), this is why we have "mt" which should be used instead.Signed-off-by Oleg Nesterov <[email protected]>
Thanks!
[tip:sched/urgent] sched: set_cpus_allowed_ptr(): Don't use rq->migration_thread after unlock
In reply to Oleg NesterovCommit-ID: 47a70985e5c093ae03d8ccf633c70a93761d86f2 Gitweb: http://git.kernel.org/tip/47a70985e5c093ae03d8ccf633c70a93761d86f2 Author: Oleg Nesterov <[email protected]> AuthorDate: Tue, 30 Mar 2010 18:58:29 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 2 Apr 2010 20:11:05 +0200
sched: set_cpus_allowed_ptr(): Don't use rq->migration_thread after unlock
Trivial typo fix. rq->migration_thread can be NULL after task_rq_unlock(), this is why we have "mt" which should be
used instead.
Signed-off-by Oleg Nesterov <[email protected]>
Signed-off-by Peter Zijlstra <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by Ingo Molnar <[email protected]>
--- kernel/sched.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/sched.c +1 -1
@@ -5387,7 +5387,7 @@ int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask)get_task_struct (mt);task_rq_unlock (rq, &flags); -wake_up_process (rq->migration_thread); +wake_up_process (mt);put_task_struct (mt);wait_for_completion (&req.done);tlb_migrate_finish (p->mm);