Messages in this thread | | | Date | Sat, 18 Oct 2014 23:18:40 +0200 | From | Oleg Nesterov <> | Subject | Re: [PATCH] sched/numa: fix unsafe get_task_struct() in task_numa_assign() |
| |
On 10/18, Peter Zijlstra wrote: > > So you worry about the refcount doing 0->1 ? In which case the above is > still wrong and we should be using atomic_inc_not_zero() in order to > acquire the reference count.
It is actually worse, please see my reply to Kirill. We simply can't dereference foreign_rq->curr lockless.
Again, task_struct is only protected by RCU if it was found on a RCU protected list. rq->curr is not protected by rcu. Perhaps we have to change this... but this will be a bit unfortunate.
Oleg.
| |