Messages in this thread | | | Date | Tue, 21 Oct 2014 11:45:58 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH v3] sched/numa: fix unsafe get_task_struct() in task_numa_assign() |
| |
On Mon, Oct 20, 2014 at 10:50:06PM +0200, Oleg Nesterov wrote: > Let me explain what I personally dislike in v3: > > - I think that we do not have enough reasons for > SLAB_DESTROY_BY_RCU. This is the serious change.
What exactly would the downsides be? SDBR has very limited space overhead iirc.
> - Again, perhaps we should start we a simple and stupid fix. > We can do get_task_struct() under rq->lock or, if nothing > else, just > > raw_spin_lock_irq(&rq->lock); > cur = rq->curr; > if (is_idle_task(cur) || (cur->flags & PF_EXITING)) > cur = NULL; > raw_spin_unlock_irq(&rq->lock);
I think I agree with you, this is the simple safe option and is something we can easily backport. After that we can add creative bits on top.
I think I prefer the SLAB_DESTROY_BY_RCU thing over the probe_kernel thing -- but we can take our time once we've fixed the immediate issue with the simple option.
| |