Skip to content

Commit

Permalink
[PATCH] uml: idle thread needn't take access to init_mm
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed Mar 31, 2006
1 parent e11c0cd commit 12523bd
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions arch/um/kernel/process_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down

0 comments on commit 12523bd

Please sign in to comment.