[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141016080106.GD7369@worktop.fdxtended.com>
Date: Thu, 16 Oct 2014 10:01:06 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Kirill Tkhai <ktkhai@...allels.com>, linux-kernel@...r.kernel.org,
Ingo Molnar <mingo@...hat.com>,
Vladimir Davydov <vdavydov@...allels.com>,
Kirill Tkhai <tkhai@...dex.ru>
Subject: Re: [PATCH RFC] sched: Revert delayed_put_task_struct() and fix use
after free
On Wed, Oct 15, 2014 at 05:06:41PM +0200, Oleg Nesterov wrote:
>
> At least the code like
>
> rcu_read_lock();
> get_task_struct(foreign_rq->curr);
> rcu_read_unlock();
>
> is certainly wrong. And _probably_ the problem should be fixed here. Perhaps
> we can add try_to_get_task_struct() which does atomic_inc_not_zero() ...
There is an rcu_read_lock() around it through task_numa_compare().
--
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