[PATCH] uml: idle thread needn't take access to init_mm
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Fri, 31 Mar 2006 10:30:18 +0000 (02:30 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 31 Mar 2006 20:18:51 +0000 (12:18 -0800)
Comparing this code which is the actual body of the arch-independent
cpu_idle(), it is clear that it's unnecessary to set ->mm and ->active_mm;
beyond that, a kernel thread is not supposed to have ->mm != NULL, only
active_mm.

This showed up because I used the assumption (which is IMHO valid) that kernel
thread have their ->mm == NULL, and it failed for this thread.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/kernel/process_kern.c

index 6922bdf..ba8a52c 100644 (file)
@@ -185,10 +185,6 @@ void default_idle(void)
 {
        CHOOSE_MODE(uml_idle_timer(), (void) 0);
 
-       atomic_inc(&init_mm.mm_count);
-       current->mm = &init_mm;
-       current->active_mm = &init_mm;
-
        while(1){
                /* endless idle loop with no priority at all */