Files
linux-legacy/include/linux
Oleg Nesterov 6dda81f438 pids: document task_pgrp/task_session is not safe without tasklist/rcu
Even if task == current, it is not safe to dereference the result of
task_pgrp/task_session.  We can race with another thread which changes the
special pid via setpgid/setsid.

Document this.  The next 2 patches give an example of the unsafe usage, we
have more bad users.

[akpm@linux-foundation.org: coding-style fixes]
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-18 19:45:11 -07:00
…
…
…
…
…
2009-03-05 14:39:32 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-04-01 08:59:23 -07:00
2009-04-01 08:59:23 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-03-27 14:43:57 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
2009-03-27 14:43:59 -04:00
2009-03-01 00:19:35 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-01-28 23:21:18 +01:00
…
…
…
2009-03-16 08:32:27 -06:00
…
2009-04-02 19:04:52 -07:00
…
…
…
2009-04-01 08:59:29 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-03-24 12:35:17 +01:00
…
…
…
…
…
…
…
…
…
…
2009-04-01 08:59:14 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-03-31 20:15:33 +02:00
2009-04-02 19:04:53 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-03-13 14:32:29 +01:00
…
…
…
…
…
…
…
…
…
…
2009-04-02 19:04:49 -07:00
…
…
…
…
2009-04-01 08:59:18 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-03-24 22:52:39 -04:00
…
…
…
…
…
…
…
…
…
2009-04-01 08:59:17 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-04-02 19:04:48 -07:00
…
…
…
…
2009-03-26 10:56:35 -07:00
…
…
…
…
2009-03-20 10:48:14 -07:00
…
…
…
…
…
…
…
…
2009-03-15 19:59:13 -07:00
…
…
…
…
2009-04-01 13:28:15 -04:00
2009-04-01 13:28:15 -04:00
…
2009-03-10 20:33:18 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
2009-04-01 08:59:13 -07:00
2009-04-01 08:59:13 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-04-01 08:59:13 -07:00
…
…
2009-03-13 16:09:12 -07:00
…
…
…
…
…
2009-03-26 02:18:35 +01:00
…
…
…
…
…
…
…
…
…
2009-03-30 14:28:58 -07:00
…
…
…
…
…
…
…
…
…
2009-04-01 08:59:24 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-04-01 08:59:13 -07:00
…
…
2009-04-01 08:59:15 -07:00
…
…
2009-04-02 19:05:01 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-03-26 18:14:21 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…