Re: [PATCH 2/8] kernel/fork: Duplicate task_struct before stack allocation.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx
- Subject: Re: [PATCH 2/8] kernel/fork: Duplicate task_struct before stack allocation.
- From: Andy Lutomirski <luto@xxxxxxxxxx>
- Date: Fri, 11 Feb 2022 15:42:38 -0800
- Cc: Ben Segall <bsegall@xxxxxxxxxx>, Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>, Dietmar Eggemann <dietmar.eggemann@xxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Juri Lelli <juri.lelli@xxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Vincent Guittot <vincent.guittot@xxxxxxxxxx>
- In-reply-to: <20220125152652.1963111-3-bigeasy@linutronix.de>
- References: <20220125152652.1963111-1-bigeasy@linutronix.de> <20220125152652.1963111-3-bigeasy@linutronix.de>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0
On 1/25/22 07:26, Sebastian Andrzej Siewior wrote:
alloc_thread_stack_node() already populates the task_struct::stack
member except on IA64. The stack pointer is saved and populated again
because IA64 needs it and arch_dup_task_struct() overwrites it.
I understand the problem, I think.
Allocate thread's stack after task_struct has been duplicated as a
preparation.
But I don't understand this. How does this patch relate to the problem?
Also, you appear to be missing a change to the free_stack and free_tsk
code at the end of dup_task_struct().
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]