Oleg Nesterov
52ee2dfdd4
pids: refactor vnr/nr_ns helpers to make them safe
...
Inho, the safety rules for vnr/nr_ns helpers are horrible and buggy.
task_pid_nr_ns(task) needs rcu/tasklist depending on task == current.
As for "special" pids, vnr/nr_ns helpers always need rcu. However, if
task != current, they are unsafe even under rcu lock, we can't trust
task->group_leader without the special checks.
And almost every helper has a callsite which needs a fix.
Also, it is a bit annoying that the implementations of, say,
task_pgrp_vnr() and task_pgrp_nr_ns() are not "symmetrical".
This patch introduces the new helper, __task_pid_nr_ns(), which is always
safe to use, and turns all other helpers into the trivial wrappers.
After this I'll send another patch which converts task_tgid_xxx() as well,
they're are a bit special.
Signed-off-by: Oleg Nesterov <oleg@redhat.com >
Cc: Louis Rilling <Louis.Rilling@kerlabs.com >
Cc: "Eric W. Biederman" <ebiederm@xmission.com >
Cc: Pavel Emelyanov <xemul@openvz.org >
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com >
Cc: Roland McGrath <roland@redhat.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2009-04-02 19:05:02 -07:00
..
2009-03-26 18:14:15 +01:00
2009-04-02 19:04:50 -07:00
2009-03-26 22:45:23 -07:00
2009-03-26 18:14:14 +01:00
2009-03-26 16:11:41 -07:00
2009-04-02 19:04:51 -07:00
2009-03-28 15:54:48 -04:00
2009-03-26 15:23:24 -07:00
2009-03-24 16:38:23 -07:00
2009-04-01 09:47:12 -07:00
2009-03-26 18:14:14 +01:00
2009-03-26 11:20:23 -07:00
2009-03-26 18:14:15 +01:00
2009-03-26 18:14:15 +01:00
2009-04-01 08:59:23 -07:00
2009-04-01 08:59:23 -07:00
2009-04-02 19:05:01 -07:00
2009-04-01 08:59:14 -07:00
2009-03-28 13:30:43 -07:00
2009-04-01 08:59:14 -07:00
2009-04-02 19:04:56 -07:00
2009-03-27 14:51:13 +01:00
2009-03-26 18:14:15 +01:00
2009-03-26 18:14:14 +01:00
2009-03-27 14:43:57 -04:00
2009-03-26 18:14:23 +01:00
2009-03-24 16:38:26 -07:00
2009-04-02 19:05:00 -07:00
2009-04-02 19:04:57 -07:00
2009-03-26 18:14:14 +01:00
2009-03-27 14:43:59 -04:00
2009-03-24 16:38:26 -07:00
2009-03-26 18:14:15 +01:00
2009-03-26 18:14:15 +01:00
2009-03-30 21:46:44 +02:00
2009-03-24 16:38:27 -07:00
2009-04-01 08:59:20 -07:00
2009-04-02 19:04:52 -07:00
2009-04-01 08:59:29 -07:00
2009-03-28 17:30:00 -07:00
2009-04-01 08:59:17 -07:00
2009-04-01 08:59:22 -07:00
2009-04-01 08:59:14 -07:00
2009-03-28 21:34:44 +01:00
2009-03-30 12:43:28 -03:00
2009-03-28 21:34:45 +01:00
2009-03-31 20:15:33 +02:00
2009-04-02 19:04:53 -07:00
2009-03-27 20:13:02 -04:00
2009-03-26 18:14:15 +01:00
2009-03-28 13:30:43 -07:00
2009-03-27 00:46:44 -07:00
2009-03-26 18:14:14 +01:00
2009-03-30 13:41:00 -07:00
2009-03-30 21:46:54 +02:00
2009-03-26 18:14:15 +01:00
2009-03-31 01:14:44 +04:00
2009-03-30 21:46:54 +02:00
2009-03-27 17:28:43 +01:00
2009-03-30 12:43:22 -03:00
2009-03-26 18:14:15 +01:00
2009-03-25 23:35:46 -04:00
2009-03-26 18:14:17 +01:00
2009-04-02 19:04:49 -07:00
2009-04-01 08:59:18 -07:00
2009-03-24 16:38:26 -07:00
2009-03-24 22:52:39 -04:00
2009-04-01 08:59:17 -07:00
2009-03-26 18:14:15 +01:00
2009-04-02 19:04:56 -07:00
2009-04-02 19:04:50 -07:00
2009-04-02 19:04:48 -07:00
2009-04-02 19:04:48 -07:00
2009-04-01 08:59:11 -07:00
2009-03-24 16:38:24 -07:00
2009-03-26 10:56:35 -07:00
2009-03-26 18:14:14 +01:00
2009-03-27 14:44:00 -04:00
2009-03-28 13:30:43 -07:00
2009-03-24 16:37:55 -07:00
2009-03-28 23:55:58 -07:00
2009-04-01 13:28:15 -04:00
2009-04-01 13:28:15 -04:00
2009-03-27 20:13:04 -04:00
2009-04-02 19:04:56 -07:00
2009-04-01 08:59:13 -07:00
2009-04-01 08:59:14 -07:00
2009-04-02 19:04:49 -07:00
2009-04-01 08:59:13 -07:00
2009-04-01 09:47:12 -07:00
2009-03-26 16:02:30 -07:00
2009-04-01 09:47:12 -07:00
2009-03-26 18:14:15 +01:00
2009-03-24 16:38:26 -07:00
2009-03-24 16:38:26 -07:00
2009-04-01 08:59:13 -07:00
2009-03-26 18:14:14 +01:00
2009-03-31 01:14:44 +04:00
2009-04-02 19:05:00 -07:00
2009-03-26 02:18:35 +01:00
2009-03-26 02:18:37 +01:00
2009-03-30 14:28:58 -07:00
2009-03-30 12:16:38 -07:00
2009-03-30 12:16:39 -07:00
2009-03-30 12:33:01 -07:00
2009-03-30 12:16:39 -07:00
2009-04-02 19:04:51 -07:00
2009-04-01 08:59:24 -07:00
2009-04-02 19:05:02 -07:00
2009-03-28 15:01:37 +11:00
2009-03-26 18:14:15 +01:00
2009-03-30 22:05:11 +10:30
2009-03-29 01:40:34 -07:00
2009-03-26 16:11:41 -07:00
2009-04-01 08:59:13 -07:00
2009-03-26 18:14:14 +01:00
2009-04-01 08:59:16 -07:00
2009-04-01 08:59:15 -07:00
2009-04-02 19:05:01 -07:00
2009-03-26 18:14:14 +01:00
2009-03-30 17:17:35 -07:00
2009-03-26 18:14:14 +01:00
2009-04-02 19:05:00 -07:00
2009-04-01 08:59:10 -07:00
2009-03-26 18:14:21 +01:00
2009-03-24 16:38:24 -07:00
2009-03-24 16:20:34 -07:00
2009-03-24 16:20:36 -07:00
2009-03-26 18:14:14 +01:00
2009-03-30 12:43:40 -03:00
2009-03-30 12:43:15 -03:00
2009-04-01 08:59:20 -07:00
2009-04-02 19:04:50 -07:00
2009-04-01 08:59:13 -07:00
2009-03-26 18:14:14 +01:00