From: Dave McCracken <dmccr@us.ibm.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] Prevent reuse of active thread group id
Date: Mon, 20 Aug 2001 10:35:04 -0500 [thread overview]
Message-ID: <87110000.998321704@baldur> (raw)
The thread group id of a task is initially assigned the value of that
task's pid, then is inherited for each child task created with
CLONE_THREAD. This patch makes sure that the thread group id is never
re-used as another task's pid as long as there's an active task with that
tgid.
Patch is below.
Dave McCracken
======================================================================
Dave McCracken IBM Linux Base Kernel Team 1-512-838-3059
dmccr@us.ibm.com T/L 678-3059
====================
--- linux-2.4.9/./kernel/fork.c Tue Jul 17 20:23:28 2001
+++ linux-2.4.9-tgid/./kernel/fork.c Mon Aug 20 10:28:22 2001
@@ -101,6 +101,7 @@
for_each_task(p) {
if(p->pid == last_pid ||
p->pgrp == last_pid ||
+ p->tgid == last_pid ||
p->session == last_pid) {
if(++last_pid >= next_safe) {
if(last_pid & 0xffff8000)
next reply other threads:[~2001-08-20 15:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-20 15:35 Dave McCracken [this message]
2001-08-20 16:19 ` [PATCH] Prevent reuse of active thread group id Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87110000.998321704@baldur \
--to=dmccr@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox