From 9a5d3023e626a0baf86ac6b892c983b3db13f22b Mon Sep 17 00:00:00 2001 From: Oren Laadan Date: Sun, 8 Jan 2006 01:03:51 -0800 Subject: [PATCH] [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-format-patch failed