[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080422140636.GA1683@Krystal>
Date:	Tue, 22 Apr 2008 10:06:36 -0400
From:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	akpm@...l.org, "H. Peter Anvin" <hpa@...or.com>,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	"Frank Ch. Eigler" <fche@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Fix x86_64 page fault scheduler race
* Ingo Molnar (mingo@...e.hu) wrote:
> 
> * Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca> wrote:
> 
> > You are right in that x86_64 does not seems to play as safely as 
> > x86_32 on this matter; it uses current->mm. Probably it shouldn't 
> > assume "current" is valid. Actually, I don't see where x86_64 disables 
> > interrupts around __switch_to, so this would seem to be a race 
> > condition. Or have I missed something ?
> 
> the scheduler disables interrupts around __switch_to(). (x86 does not 
> set __ARCH_WANT_INTERRUPTS_ON_CTXSW)
> 
> 	Ingo
Ok, so I guess it's only useful to NMIs then. However, it makes me
wonder why this comment was there in the first place on x86_32
vmalloc_fault() and why it uses read_cr3() :
        * Do _not_ use "current" here. We might be inside
        * an interrupt in the middle of a task switch..
Mathieu
-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
