Commit 14e9d573 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Linus Torvalds

[PATCH] pid: Properly detect orphaned process groups in exit_notify

In commit 0475ac08 when converting the
orphaned process group handling to use struct pid I made a small
mistake.  I accidentally replaced an == with a !=.

Besides just being a dumb thing to do apparently this has a bad side
effect.  The improper orphaned process group detection causes kwin to
die after a suspend/resume cycle.

I'm amazed this patch has been around as long as it has without anyone
else noticing something funny going on.

And the following people deserve credit for spotting and helping
to reproduce this.

Thanks to: Sid Boyce <g3vbv@blueyonder.co.uk>
Thanks to: "Michael Wu"
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c97beb47
...@@ -790,7 +790,7 @@ static void exit_notify(struct task_struct *tsk) ...@@ -790,7 +790,7 @@ static void exit_notify(struct task_struct *tsk)
pgrp = task_pgrp(tsk); pgrp = task_pgrp(tsk);
if ((task_pgrp(t) != pgrp) && if ((task_pgrp(t) != pgrp) &&
(task_session(t) != task_session(tsk)) && (task_session(t) == task_session(tsk)) &&
will_become_orphaned_pgrp(pgrp, tsk) && will_become_orphaned_pgrp(pgrp, tsk) &&
has_stopped_jobs(pgrp)) { has_stopped_jobs(pgrp)) {
__kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp); __kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment