From: Oleg Nesterov Date: Tue, 26 Apr 2011 20:37:11 +0000 (+0200) Subject: tile: do_hardwall_trap: do not play with task->sighand X-Git-Tag: v3.0-rc1~152^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ceca3c193e73bb409d093515fae9e5ef02ffa2de;p=pandora-kernel.git tile: do_hardwall_trap: do not play with task->sighand 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 Signed-off-by: Oleg Nesterov Signed-off-by: Chris Metcalf --- Reading git-diff-tree failed