login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
January
»
29
Re: [PATCH 5/12] Handle pid namespaces in cgroups code
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Paul Menage <menage@...>
To: Pavel Emelyanov <xemul@...>
Cc: Andrew Morton <akpm@...>, Linux Kernel Mailing List <linux-kernel@...>, <devel@...>, Oleg Nesterov <oleg@...>
Subject:
Re: [PATCH 5/12] Handle pid namespaces in cgroups code
Date: Tuesday, January 29, 2008 - 2:08 pm
On Jan 29, 2008 5:52 AM, Pavel Emelyanov <xemul@openvz.org> wrote:
quoted text
> There's one place that works with task pids - its the "tasks" file > in cgroups. The read/write handlers assume, that the pid values > go to/come from the user space and thus it is a virtual pid, i.e. > the pid as it is seen from inside a namespace. > > Tune the code accordingly. > > Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Paul Menage <menage@google.com>
quoted text
> > --- > kernel/cgroup.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/cgroup.c b/kernel/cgroup.c > index 2c5cccb..4766bb6 100644 > --- a/kernel/cgroup.c > +++ b/kernel/cgroup.c > @@ -1269,7 +1269,7 @@ static int attach_task_by_pid(struct cgroup *cgrp, char *pidbuf) > > if (pid) { > rcu_read_lock(); > - tsk = find_task_by_pid(pid); > + tsk = find_task_by_vpid(pid); > if (!tsk || tsk->flags & PF_EXITING) { > rcu_read_unlock(); > return -ESRCH; > @@ -1955,7 +1955,7 @@ static int pid_array_load(pid_t *pidarray, int npids, struct cgroup *cgrp) > while ((tsk = cgroup_iter_next(cgrp, &it))) { > if (unlikely(n == npids)) > break; > - pidarray[n++] = task_pid_nr(tsk); > + pidarray[n++] = task_pid_vnr(tsk); > } > cgroup_iter_end(cgrp, &it); > return n; > -- > 1.5.3.4 > >
--
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 0/12] Schedule find_task_by_pid() for removal
, Pavel Emelyanov
, (Tue Jan 29, 9:38 am)
[PATCH 12/12] Deprecate the find_task_by_pid
, Pavel Emelyanov
, (Tue Jan 29, 10:09 am)
Re: [PATCH 12/12] Deprecate the find_task_by_pid
, Andrew Morton
, (Fri Feb 1, 6:27 pm)
[PATCH 11/12] mips: use find_task_by_vpid in system calls
, Pavel Emelyanov
, (Tue Jan 29, 10:06 am)
[PATCH 10/12] ia64: fix ptrace inside a namespace
, Pavel Emelyanov
, (Tue Jan 29, 10:04 am)
[PATCH 9/12] ia64: make pfm_get_task work with virtual pids
, Pavel Emelyanov
, (Tue Jan 29, 10:02 am)
[PATCH 8/12] frv: use find_task_by_vpid in cxn_pin_by_pid
, Pavel Emelyanov
, (Tue Jan 29, 9:59 am)
[PATCH 7/12] gfs2: make gfs2_holder.gh_owner_pid be a struct...
, Pavel Emelyanov
, (Tue Jan 29, 9:57 am)
[PATCH 6/12] gfs2: make gfs2_glock.gl_owner_pid be a struct ...
, Pavel Emelyanov
, (Tue Jan 29, 9:55 am)
Re: [PATCH 6/12] gfs2: make gfs2_glock.gl_owner_pid be a str...
, Steven Whitehouse
, (Tue Jan 29, 10:19 am)
Re: [PATCH 6/12] gfs2: make gfs2_glock.gl_owner_pid be a str...
, Pavel Emelyanov
, (Tue Jan 29, 10:33 am)
[PATCH 5/12] Handle pid namespaces in cgroups code
, Pavel Emelyanov
, (Tue Jan 29, 9:52 am)
Re: [PATCH 5/12] Handle pid namespaces in cgroups code
, Paul Menage
, (Tue Jan 29, 2:08 pm)
[PATCH 4/12] Don't operate with pid_t in rtmutex tester
, Pavel Emelyanov
, (Tue Jan 29, 9:49 am)
[PATCH 3/12] Use find_task_by_vpid in taskstats
, Pavel Emelyanov
, (Tue Jan 29, 9:46 am)
[PATCH 2/12] Use find_task_by_vpid in autid code
, Pavel Emelyanov
, (Tue Jan 29, 9:43 am)
[PATCH 1/12] Use find_task_by_vpid in posix timers
, Pavel Emelyanov
, (Tue Jan 29, 9:41 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
FUJITA Tomonori
Re: Linux 2.6.25-rc4
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Jan Engelhardt
intel iommu (Re: -mm merge plans for 2.6.23)
Artem Bityutskiy
[PATCH 11/44 take 2] [UBI] allocation unit header
git
:
linux-netdev
:
David Miller
[GIT]: Networking
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Natalie Protasevich
[BUG] New Kernel Bugs
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
3 users
and
655 guests
online.
Online users
strcmp
zainabstew21
marcusjuh
Syndicate