[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56D7537B.5040804@mellanox.com>
Date: Wed, 2 Mar 2016 15:56:27 -0500
From: Chris Metcalf <cmetcalf@...lanox.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: Gilad Ben Yossef <giladb@...hip.com>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Rik van Riel <riel@...hat.com>, Tejun Heo <tj@...nel.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Christoph Lameter <cl@...ux.com>,
Viresh Kumar <viresh.kumar@...aro.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Andy Lutomirski <luto@...capital.net>,
<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH v10 07/12] task_isolation: add debug boot flag
On 3/2/2016 3:37 PM, Peter Zijlstra wrote:
> On Wed, Mar 02, 2016 at 03:09:31PM -0500, Chris Metcalf wrote:
>> +void task_isolation_debug(int cpu)
>> +{
>> + struct task_struct *p;
>> +
>> + if (!task_isolation_possible(cpu))
>> + return;
>> +
>> + rcu_read_lock();
>> + p = cpu_curr(cpu);
>> + get_task_struct(p);
> As I think Oleg keeps reminding me, this is not actually a safe thing to
> do.
So what's the right solution? The fast path in task_isolation_debug_task basically
just uses the new "task_isolation_flags", and "pid" and "comm". I would think those
would all have to be safe because of the get_task_struct().
The piece that might be problematic is the eventual call to send_sig_info() using the
task_struct pointer (called via task_isolation_debug_task -> task_isolation_interrupt).
Clearly this is safe at some level, since that's more or less what sys_kill() does and the
process could similarly evaporate half way through sending the signal.
Suggestions? Thanks!
--
Chris Metcalf, Mellanox Technologies
http://www.mellanox.com
Powered by blists - more mailing lists