Eric W. Biederman 3e7cd6c413 [PATCH] pid: replace is_orphaned_pgrp with is_current_pgrp_orphaned
Every call to is_orphaned_pgrp passed in process_group(current) which is racy
with respect to another thread changing our process group.  It didn't bite us
because we were dealing with integers and the worse we would get would be a
stale answer.

In switching the checks to use struct pid to be a little more efficient and
prepare the way for pid namespaces this race became apparent.

So I simplified the calls to the more specialized is_current_pgrp_orphaned so
I didn't have to worry about making logic changes to avoid the race.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:32 -08:00
..
2007-01-28 17:58:33 -05:00
2007-02-12 09:48:30 -08:00
2007-02-12 09:48:30 -08:00
2007-02-12 09:48:30 -08:00
2007-02-12 09:48:30 -08:00
2007-02-12 09:48:30 -08:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-12-07 08:39:41 -08:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2007-02-12 09:48:30 -08:00
2007-02-11 10:51:26 -08:00
2006-10-04 07:55:13 -07:00
2005-04-16 15:20:36 -07:00
2006-12-08 08:28:57 -08:00
2006-11-22 14:57:56 +00:00
2006-12-04 02:00:36 -05:00
2006-12-08 08:28:57 -08:00
2006-12-08 08:28:57 -08:00
2007-02-11 10:51:26 -08:00
2007-02-11 10:51:26 -08:00
2005-10-29 19:30:42 +01:00
2005-05-04 07:33:13 -07:00
2007-01-22 08:53:24 -08:00
2007-02-11 10:51:30 -08:00
2006-11-13 07:40:42 -08:00
2007-02-11 11:18:06 -08:00
2007-02-12 09:48:30 -08:00
2007-02-12 09:48:30 -08:00
2006-12-08 08:28:57 -08:00
2005-04-16 15:20:36 -07:00
2007-02-11 10:51:26 -08:00
2005-04-16 15:20:36 -07:00
2007-02-12 09:48:30 -08:00
2005-04-16 15:20:36 -07:00
2007-02-12 09:48:30 -08:00
2006-01-12 09:09:00 -08:00
2006-09-29 09:18:12 -07:00
2006-12-08 08:28:57 -08:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2007-02-11 10:51:28 -08:00
2005-04-16 15:20:36 -07:00
2007-02-12 09:48:30 -08:00
2006-12-13 09:05:49 -08:00
2006-12-08 08:28:59 -08:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2007-02-12 09:48:30 -08:00
2007-02-12 09:48:30 -08:00
2007-02-12 09:48:30 -08:00
2007-01-23 07:52:06 -08:00
2006-12-20 16:37:48 +11:00
2006-12-20 16:37:47 +11:00
2006-12-08 08:28:57 -08:00
2007-02-12 09:48:30 -08:00