[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4DBF3341.6090908@tilera.com>
Date: Mon, 2 May 2011 18:42:09 -0400
From: Chris Metcalf <cmetcalf@...era.com>
To: Oleg Nesterov <oleg@...hat.com>
CC: Matt Fleming <matt@...sole-pimps.org>, Tejun Heo <tj@...nel.org>,
<linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
"H. Peter Anvin" <hpa@...or.com>,
Matt Fleming <matt.fleming@...ux.intel.com>
Subject: Re: [PATCH 1/1] tile: do_hardwall_trap: do not play with task->sighand
On 4/26/2011 4:37 PM, Oleg Nesterov wrote:
> 1. do_hardwall_trap() checks ->sighand != NULL and then takes ->siglock.
>
> This is unsafe even if the task can't run (I assume it is pinned to
> the same CPU), its parent can reap the task and set ->sighand = NULL
> right after this check. Even if the compiler dosn't read ->sighand
> twice and this memory can't to away __group_send_sig_info() is wrong
> after that. Use do_send_sig_info().
>
> 2. Send SIGILL to the thread, not to the whole process. Unless it has
> the handler or blocked this kills the whole thread-group as before.
> IIUC, different threads can be bound to different rect's.
>
> 3. Check PF_EXITING instead of ->sighand. A zombie thread can go away
> but its ->sighand can be !NULL.
>
> Reported-by: Matt Fleming <matt@...sole-pimps.org>
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
Thanks, I've taken this change into the tile tree.
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
--
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