[patch] pidhash-fix-2.5.36-A0

Ingo Molnar (mingo@elte.hu)
Fri, 20 Sep 2002 11:09:31 +0200 (CEST)


the attached patch (against BK-curr) fixes a bug in the new PID allocator,
which bug can cause incorrect hashing of the PID structure which causes
infinite loops in find_pid(). [and potentially other problems.]

Ingo

--- linux/kernel/pid.c.orig Fri Sep 20 11:01:52 2002
+++ linux/kernel/pid.c Fri Sep 20 11:03:05 2002
@@ -161,8 +161,8 @@
pid->nr = nr;
atomic_set(&pid->count, 1);
INIT_LIST_HEAD(&pid->task_list);
- pid->task = current;
- get_task_struct(current);
+ pid->task = task;
+ get_task_struct(task);
list_add(&pid->hash_chain, &pid_hash[type][pid_hashfn(nr)]);
}
list_add(&task->pids[type].pid_chain, &pid->task_list);

-
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/