lkml.org 
[lkml]   [2009]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] ptrace: do_notify_parent_cldstop: fix the wrong ->nsproxy usage
Roland McGrath [roland@redhat.com] wrote:
| > Yes. Perhaps it would be nice to add a helper,
|
| I agree.
|
| > > sys_kill, do_tkill all look wrong to me.
| >
| > They should be fine, note the
| >
| > if (from_ancestor_ns)
| > q->info.si_pid = 0;
| >
| > in __send_signal(). If we send the signal "down" to the sub-namespace,
| > si_pid == 0 is correct. And, unlike do_notify_parent/ptrace_notify/etc
| > kill/tkill can't send the signal "up".
|
| Ah, right. I knew there was something around this I was forgetting.

Setting si_pid to task_tgid_vnr(current); in places like do_tkill() is
slightly misleading bc, it can get modified later in send_signal(). We
can't set si_pid correctly in do_tkill() since we must first establish
pid-namespace relationship and that can mess up control flow.

Maybe a comment will help.


\
 
 \ /
  Last update: 2009-06-02 06:59    [W:0.110 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site