From: Paolo 'Blaisorblade' Giarrusso Date: Fri, 31 Mar 2006 10:30:18 +0000 (-0800) Subject: [PATCH] uml: idle thread needn't take access to init_mm X-Git-Tag: v2.6.17-rc1~109 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12523bdce1a6b5a3a2627b9901162bbd3eef33ed;p=linux-2.6 [PATCH] uml: idle thread needn't take access to init_mm 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 Acked-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c index 6922bdfb5a..ba8a52c1f7 100644 --- a/arch/um/kernel/process_kern.c +++ b/arch/um/kernel/process_kern.c @@ -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 */