[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141021094558.GQ23531@worktop.programming.kicks-ass.net>
Date: Tue, 21 Oct 2014 11:45:58 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Kirill Tkhai <tkhai@...dex.ru>,
Kirill Tkhai <ktkhai@...allels.com>,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Vladimir Davydov <vdavydov@...allels.com>
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists