lkml.org 
[lkml]   [2014]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.


\
 
 \ /
  Last update: 2014-10-21 12:01    [W:0.069 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site