lkml.org 
[lkml]   [2010]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/24] pidns: Remove races by stopping the caching of proc_mnt
Quoting Eric W. Biederman (ebiederm@xmission.com):
...
> @@ -2742,13 +2743,13 @@ void proc_flush_task(struct task_struct *task)
>
> for (i = 0; i <= pid->level; i++) {
> upid = &pid->numbers[i];
> - proc_flush_task_mnt(upid->ns->proc_mnt, upid->nr,
> - tgid->numbers[i].nr);
> - }
> + mnt = get_proc_mnt(upid->ns);

...

> -int pid_ns_prepare_proc(struct pid_namespace *ns)
> +struct vfsmount *get_proc_mnt(struct pid_namespace *ns)
> {
> - struct vfsmount *mnt;
> -
> - mnt = kern_mount_data(&proc_fs_type, ns);
> - if (IS_ERR(mnt))
> - return PTR_ERR(mnt);
> -
> - return 0;
> + return kern_mount_data(&proc_fs_type, ns);

Uh, that looks like it's got to be a *huge* hit. Each kern_mount_data()
will at least alloc space for a vfsmnt and proc_fs_type->name. Once for
each pid level of each exiting task.

(Or am I misreading?)

-serge


\
 
 \ /
  Last update: 2010-07-10 00:15    [W:0.498 / U:1.076 seconds]
©2003-2014 Jasper Spaans. Advertise on this site