From: Oren Laadan Date: Sun, 8 Jan 2006 09:03:51 +0000 (-0800) Subject: [PATCH] fork: fix race in setting child's pgrp and tty X-Git-Tag: v2.6.16-rc1~736 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a5d3023e626a0baf86ac6b892c983b3db13f22b;p=pandora-kernel.git [PATCH] fork: fix race in setting child's pgrp and tty In fork, child should recopy parent's pgrp/tty after it has tasklist_lock. Otherwise following a setpgid() on the parent, *after* copy_signal(), the child will own a stale pgrp (which may be reused); (eg. if copy_mm() sleeps a long while due to memory pressure). Similar issue for the tty. Signed-off-by: Oren Laadan Cc: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed