diff options
author | Oleg Nesterov <[email protected]> | 2010-05-26 14:44:11 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2010-05-27 09:12:52 -0700 |
commit | f106eee10038c2ee5b6056aaf3f6d5229be6dcdd (patch) | |
tree | de7ce930b7119a1be00f3c7604065896d31abc9c /net/lapb/lapb_in.c | |
parent | f20011457f41c11edb5ea5038ad0c8ea9f392023 (diff) |
pids: fix fork_idle() to setup ->pids correctly
copy_process(pid => &init_struct_pid) doesn't do attach_pid/etc.
It shouldn't, but this means that the idle threads run with the wrong
pids copied from the caller's task_struct. In x86 case the caller is
either kernel_init() thread or keventd.
In particular, this means that after the series of cpu_up/cpu_down an
idle thread (which never exits) can run with .pid pointing to nowhere.
Change fork_idle() to initialize idle->pids[] correctly. We only set
.pid = &init_struct_pid but do not add .node to list, INIT_TASK() does
the same for the boot-cpu idle thread (swapper).
Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Cedric Le Goater <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Eric Biederman <[email protected]>
Cc: Herbert Poetzl <[email protected]>
Cc: Mathias Krause <[email protected]>
Acked-by: Roland McGrath <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Cc: Sukadev Bhattiprolu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions