lkml.org 
[lkml]   [2007]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] fix setsid() for sub-namespace /sbin/init
On 11/26, Oleg Nesterov wrote:
>
> sys_setsid() still deals with pid_t's from the global namespace. This means
> that the "session > 1" check can't help for sub-namespace init, setsid() can't
> succeed because copy_process(CLONE_NEWPID) populates PIDTYPE_PGID/SID links.
>
> Remove the usage of task_struct->pid and convert the code to use "struct pid".
> This also simplifies and speedups the code, saves one find_pid().

Паша, глянь пжалста. Я не думаю, что это нужно для 2.6.24, bug (если я еще раз
не ошибся и он есть) очень мелкий, но все-таки...

Вопрос. вот у нас есть task_struct *p = find_task_by_vpid(pid), почему у нас нет
хелпера получить его pid_t ? task_pid_vnr() вернет не то, что нужно (что уже не
очень хорошо с точки зрения именования ;), и мы должны делать

task_pid_nr_ns(p, current->nsproxy->pid_ns);

УЖОС!!! :-(

Oleg.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-11-26 15:45    [W:0.174 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site