diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-06-24 20:07:33 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-06-24 20:07:33 -0400 |
| commit | 7f1a00b6fcd0e3c19beba2e92d157dc0c2cf3494 (patch) | |
| tree | 5337170de6c5a720643c84673b1ceabc676518c7 | |
| parent | aca9c293d098292579e345b2b39b394778d41526 (diff) | |
fix up initial thread stack pointer vs thread_info confusion
The INIT_TASK() initializer was similarly confused about the stack vs
thread_info allocation that the allocators had, and that were fixed in
commit b235beea9e99 ("Clarify naming of thread info/stack allocators").
The task ->stack pointer only incidentally ends up having the same value
as the thread_info, and in fact that will change.
So fix the initial task struct initializer to point to 'init_stack'
instead of 'init_thread_info', and make sure the ia64 definition for
that exists.
This actually makes the ia64 tsk->stack pointer be sensible for the
initial task, but not for any other task. As mentioned in commit
b235beea9e99, that whole pointer isn't actually used on ia64, since
task_stack_page() there just points to the (single) allocation.
All the other architectures seem to have copied the 'init_stack'
definition, even if it tended to be generally unusued.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| -rw-r--r-- | arch/ia64/kernel/init_task.c | 1 | ||||
| -rw-r--r-- | include/linux/init_task.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/ia64/kernel/init_task.c b/arch/ia64/kernel/init_task.c index f9efe9739d3f..0eaa89f3defd 100644 --- a/arch/ia64/kernel/init_task.c +++ b/arch/ia64/kernel/init_task.c | |||
| @@ -26,6 +26,7 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | |||
| 26 | * handled. This is done by having a special ".data..init_task" section... | 26 | * handled. This is done by having a special ".data..init_task" section... |
| 27 | */ | 27 | */ |
| 28 | #define init_thread_info init_task_mem.s.thread_info | 28 | #define init_thread_info init_task_mem.s.thread_info |
| 29 | #define init_stack init_task_mem.stack | ||
| 29 | 30 | ||
| 30 | union { | 31 | union { |
| 31 | struct { | 32 | struct { |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index f2cb8d45513d..f8834f820ec2 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
| @@ -190,7 +190,7 @@ extern struct task_group root_task_group; | |||
| 190 | #define INIT_TASK(tsk) \ | 190 | #define INIT_TASK(tsk) \ |
| 191 | { \ | 191 | { \ |
| 192 | .state = 0, \ | 192 | .state = 0, \ |
| 193 | .stack = &init_thread_info, \ | 193 | .stack = init_stack, \ |
| 194 | .usage = ATOMIC_INIT(2), \ | 194 | .usage = ATOMIC_INIT(2), \ |
| 195 | .flags = PF_KTHREAD, \ | 195 | .flags = PF_KTHREAD, \ |
| 196 | .prio = MAX_PRIO-20, \ | 196 | .prio = MAX_PRIO-20, \ |
