lkml.org 
[lkml]   [2014]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] sched/numa: fix unsafe get_task_struct() in task_numa_assign()
On 11/10/2014 05:03 AM, Peter Zijlstra wrote:
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -1268,6 +1268,13 @@ static void task_numa_compare(struct tas
> raw_spin_unlock_irq(&dst_rq->lock);
>
> /*
> + * Because we have preemption enabled we can get migrated around and
> + * end try selecting ourselves (current == env->p) as a swap candidate.
> + */
> + if (cur == env->p)
> + goto unlock;

This is too late though, because currently the lockup happens couple of lines
above that at:

raw_spin_lock_irq(&dst_rq->lock); <=== here
cur = dst_rq->curr;

Which got me a bit stuck trying to use your old patch since we can't access '->curr'
without locking dst_rq, but locking dst_rq is causing a lockup.


Thanks,
Sasha


\
 
 \ /
  Last update: 2014-11-10 17:41    [W:0.057 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site