Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix build break in fork.c when THREAD_SIZE < PAGE_SIZE

Commit b235beea9e99 ("Clarify naming of thread info/stack allocators")
breaks the build on some powerpc configs, where THREAD_SIZE < PAGE_SIZE:

kernel/fork.c:235:2: error: implicit declaration of function 'free_thread_stack'
kernel/fork.c:355:8: error: assignment from incompatible pointer type
stack = alloc_thread_stack_node(tsk, node);
^

Fix it by renaming free_stack() to free_thread_stack(), and updating the
return type of alloc_thread_stack_node().

Fixes: b235beea9e99 ("Clarify naming of thread info/stack allocators")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Michael Ellerman and committed by
Linus Torvalds
9521d399 086e3eb6

+2 -2
+2 -2
kernel/fork.c
··· 183 183 # else 184 184 static struct kmem_cache *thread_stack_cache; 185 185 186 - static struct thread_info *alloc_thread_stack_node(struct task_struct *tsk, 186 + static unsigned long *alloc_thread_stack_node(struct task_struct *tsk, 187 187 int node) 188 188 { 189 189 return kmem_cache_alloc_node(thread_stack_cache, THREADINFO_GFP, node); 190 190 } 191 191 192 - static void free_stack(unsigned long *stack) 192 + static void free_thread_stack(unsigned long *stack) 193 193 { 194 194 kmem_cache_free(thread_stack_cache, stack); 195 195 }