login
Header Space

 
 

Re: [PATCH] kill_something_info: don't take tasklist_lock for pid==-1 case

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Eric W. Biederman <ebiederm@...>
Cc: Atsushi Tsuji <a-tsuji@...>, <linux-kernel@...>, Roland McGrath <roland@...>
Date: Saturday, May 31, 2008 - 12:55 pm

Sorry, sorry for the delay,

On 05/20, Eric W. Biederman wrote:

Hmm. could you clarify? I tend to always trust you, just can't understand
the text above...

However, I think this patch adds another subtle race which I missed before.

Let's suppose that the task has two threads, A (== main thread) and B. A has
already exited, B does exec.

In that case it is possible that (without tasklist_lock) kill_something_info()
sends the signal to the old leader (A), but before group_send_sig_info(A)
takes ->siglock B switches the leader and does release_task(A). In that
group_send_sig_info()->lock_task_sighand() fails and we miss the process.


Note the (broken) "p->pid > 1" check, kill_something_info() skips init.
Not that it matters though.

Oleg.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] kill_something_info: don't take tasklist_lock fo..., Eric W. Biederman, (Tue May 20, 11:47 pm)
Re: [PATCH] kill_something_info: don't take tasklist_lock fo..., Oleg Nesterov, (Sat May 31, 12:55 pm)
Re: [PATCH] kill_something_info: don't take tasklist_lock fo..., Eric W. Biederman, (Sat May 31, 7:55 pm)
Re: [PATCH] kill_something_info: don't take tasklist_lock fo..., Eric W. Biederman, (Wed May 28, 11:03 am)
Re: [PATCH] kill_something_info: don't take tasklist_lock fo..., Eric W. Biederman, (Tue May 20, 10:53 pm)
speck-geostationary