mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
UPSTREAM: Fix build break in fork.c when THREAD_SIZE < PAGE_SIZE
Commitb235beea9e("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:b235beea9e("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> Bug: 38331309 Change-Id: I5b7f920b459fb84adf5fc75f83bb488b855c4deb (cherry picked from commit9521d39976) Signed-off-by: Zubin Mithra <zsm@google.com>
This commit is contained in:
committed by
Amit Pundir
parent
0b0225bf2f
commit
e0e5d1e258
@@ -176,13 +176,13 @@ static inline void free_thread_stack(unsigned long *stack)
|
||||
# else
|
||||
static struct kmem_cache *thread_stack_cache;
|
||||
|
||||
static struct thread_info *alloc_thread_stack_node(struct task_struct *tsk,
|
||||
static unsigned long *alloc_thread_stack_node(struct task_struct *tsk,
|
||||
int node)
|
||||
{
|
||||
return kmem_cache_alloc_node(thread_stack_cache, THREADINFO_GFP, node);
|
||||
}
|
||||
|
||||
static void free_stack(unsigned long *stack)
|
||||
static void free_thread_stack(unsigned long *stack)
|
||||
{
|
||||
kmem_cache_free(thread_stack_cache, stack);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user