From: Jeff Dike Date: Mon, 16 Jul 2007 06:38:48 +0000 (-0700) Subject: uml: use get_free_pages to allocate kernel stacks X-Git-Tag: v2.6.23-rc1~988 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84812217e395f5272eac36856c0a2415d61fe139;p=linux-2.6 uml: use get_free_pages to allocate kernel stacks For some reason, I was using kmalloc instead of get_free_pages for kernel stacks. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h index 18a13ba746..07aa4e50e4 100644 --- a/include/asm-um/thread_info.h +++ b/include/asm-um/thread_info.h @@ -54,8 +54,10 @@ static inline struct thread_info *current_thread_info(void) /* thread information allocation */ #define alloc_thread_info(tsk) \ - ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL)) -#define free_thread_info(ti) kfree(ti) + ((struct thread_info *) __get_free_pages(GFP_KERNEL, \ + CONFIG_KERNEL_STACK_ORDER)) +#define free_thread_info(ti) \ + free_pages((unsigned long)(ti),CONFIG_KERNEL_STACK_ORDER) #endif