Messages in this thread Patch in this message | | | Date | Mon, 20 Aug 2001 10:35:04 -0500 | From | Dave McCracken <> | Subject | [PATCH] Prevent reuse of active thread group id |
| |
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) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |