Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12523bdc authored by Paolo 'Blaisorblade' Giarrusso's avatar Paolo 'Blaisorblade' Giarrusso Committed by Linus Torvalds
Browse files

[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: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e11c0cdf
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -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 */