Commit 2bb4954f authored by Ingo Molnar's avatar Ingo Molnar

[PATCH] pidhash-fix-2.5.36-A0

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.]
parent 2188a617
...@@ -161,8 +161,8 @@ int attach_pid(task_t *task, enum pid_type type, int nr) ...@@ -161,8 +161,8 @@ int attach_pid(task_t *task, enum pid_type type, int nr)
pid->nr = nr; pid->nr = nr;
atomic_set(&pid->count, 1); atomic_set(&pid->count, 1);
INIT_LIST_HEAD(&pid->task_list); INIT_LIST_HEAD(&pid->task_list);
pid->task = current; pid->task = task;
get_task_struct(current); get_task_struct(task);
list_add(&pid->hash_chain, &pid_hash[type][pid_hashfn(nr)]); list_add(&pid->hash_chain, &pid_hash[type][pid_hashfn(nr)]);
} }
list_add(&task->pids[type].pid_chain, &pid->task_list); list_add(&task->pids[type].pid_chain, &pid->task_list);
......
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