linux-um archives
 help / color / mirror / Atom feed
From: "Paolo 'Blaisorblade' Giarrusso" <blaisorblade@yahoo.it>
To: Andrew Morton <akpm@osdl.org>
Cc: Jeff Dike <jdike@addtoit.com>,
	linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] [PATCH 1/7] uml idle thread needn't take access to init_mm
Date: Wed, 29 Mar 2006 01:56:50 +0200	[thread overview]
Message-ID: <20060328235650.13838.60908.stgit@zion.home.lan> (raw)
In-Reply-To: <20060328235442.13838.26861.stgit@zion.home.lan>

From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

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>
---

 arch/um/kernel/process_kern.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c
index 3113cab..f9948fd 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 */
 


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2006-03-29  0:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-28 23:54 [uml-devel] [PATCH 0/7] UML TLS support [for 2.6.17] Paolo 'Blaisorblade' Giarrusso
2006-03-28 23:56 ` Paolo 'Blaisorblade' Giarrusso [this message]
2006-03-28 23:56 ` [uml-devel] [PATCH 2/7] uml: split ldt.h in arch-independent and arch-dependant code Paolo 'Blaisorblade' Giarrusso
2006-03-28 23:56 ` [uml-devel] [PATCH 3/7] uml: clean arch_switch usage Paolo 'Blaisorblade' Giarrusso
2006-03-28 23:56 ` [uml-devel] [PATCH 4/7] uml: implement {get, set}_thread_area for i386 Paolo 'Blaisorblade' Giarrusso
2006-03-28 23:57 ` [uml-devel] [PATCH 5/7] uml - tls support: hack to make it compile on any host Paolo 'Blaisorblade' Giarrusso
2006-03-28 23:57 ` [uml-devel] [PATCH 6/7] uml: add arch_switch_to for newly forked thread Paolo 'Blaisorblade' Giarrusso
2006-03-28 23:57 ` [uml-devel] [PATCH 7/7] uml: check for differences in host support Paolo 'Blaisorblade' Giarrusso
2006-03-29  2:12 ` [uml-devel] Re: [PATCH 0/7] UML TLS support [for 2.6.17] Jeff Dike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060328235650.13838.60908.stgit@zion.home.lan \
    --to=blaisorblade@yahoo.it \
    --cc=akpm@osdl.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox