Commit 546c42b
fork: Duplicate task_struct before stack allocation
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.
Allocate thread's stack after task_struct has been duplicated as a
preparation for further changes.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Andy Lutomirski <luto@kernel.org>
Link: https://lore.kernel.org/r/20220217102406.3697941-3-bigeasy@linutronix.de1 parent be9a227 commit 546c42b
1 file changed
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
888 | 888 | | |
889 | 889 | | |
890 | 890 | | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
891 | 895 | | |
892 | 896 | | |
893 | 897 | | |
| |||
897 | 901 | | |
898 | 902 | | |
899 | 903 | | |
900 | | - | |
901 | | - | |
902 | 904 | | |
903 | 905 | | |
904 | 906 | | |
| |||
912 | 914 | | |
913 | 915 | | |
914 | 916 | | |
915 | | - | |
916 | | - | |
917 | | - | |
918 | 917 | | |
919 | 918 | | |
920 | 919 | | |
| |||
0 commit comments