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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Oleg Nesterov
Date: Saturday, May 31, 2008 - 9:55 am

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 ..., Eric W. Biederman, (Tue May 20, 7:53 pm)
Re: [PATCH] kill_something_info: don't take tasklist_lock ..., Eric W. Biederman, (Tue May 20, 8:47 pm)
Re: [PATCH] kill_something_info: don't take tasklist_lock ..., Eric W. Biederman, (Wed May 28, 8:03 am)
Re: [PATCH] kill_something_info: don't take tasklist_lock ..., Oleg Nesterov, (Sat May 31, 9:55 am)
Re: [PATCH] kill_something_info: don't take tasklist_lock ..., Eric W. Biederman, (Sat May 31, 4:55 pm)