]> err.no Git - linux-2.6/commitdiff
uml: use get_free_pages to allocate kernel stacks
authorJeff Dike <jdike@addtoit.com>
Mon, 16 Jul 2007 06:38:48 +0000 (23:38 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 16 Jul 2007 16:05:38 +0000 (09:05 -0700)
For some reason, I was using kmalloc instead of get_free_pages for kernel
stacks.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/asm-um/thread_info.h

index 18a13ba746053eb8da1dc912fda5957d0dc57577..07aa4e50e4d04635b2e41b5e132cd8b452ae91ff 100644 (file)
@@ -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