remarkable-linux/include
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
..
acpi
asm-arm
asm-frv mm: use debug_kmap_atomic 2009-04-01 08:59:14 -07:00
asm-generic gpiolib: allow GPIOs to be named 2009-04-02 19:04:51 -07:00
asm-h8300
asm-m32r
asm-mn10300 mm: use debug_kmap_atomic 2009-04-01 08:59:14 -07:00
crypto
drm drm: detect hdmi monitor by hdmi identifier (v3) 2009-03-29 18:31:49 +10:00
keys
linux pids: refactor vnr/nr_ns helpers to make them safe 2009-04-02 19:05:02 -07:00
math-emu
media V4L/DVB (11313): v4l2-subdev: add enum_framesizes and enum_frameintervals. 2009-03-30 12:43:49 -03:00
mtd
net netlabel: Cleanup the Smack/NetLabel code to fix incoming TCP connections 2009-03-28 15:01:37 +11:00
pcmcia
rdma
rxrpc
scsi
sound V4L/DVB (10771): tea575x-tuner: convert it to V4L2 API 2009-03-30 12:43:02 -03:00
trace
video fbdev: update s1d13xxxfb to differ between revisions and production ids 2009-04-01 08:59:32 -07:00
xen
Kbuild