lkml.org 
[lkml]   [2008]   [Mar]   [8]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 08 Mar 2008 16:58:21 +0800 (CST)
SubjectRe: [PATCH] Fix check after use in kernel/exit.c
FromWANG Cong <>
From: Ingo Molnar <mingo@elte.hu>
Date: Sat, 8 Mar 2008 09:53:22 +0100

> 
> * Ingo Molnar <mingo@elte.hu> wrote:
> 
> > > @@ -582,9 +582,9 @@ static void exit_mm(struct task_struct * tsk)
> > >  {
> > >  	struct mm_struct *mm = tsk->mm;
> > > 
> > > -	mm_release(tsk, mm);
> > >  	if (!mm)
> > >  		return;
> > > +	mm_release(tsk, mm);
> > 
> > thanks, applied. I'm wondering why this never seems to hit in 
> > practice.
> 
> actually, i unapplied it again because the patch is wrong: mm_release() 
> has side-effects for kernel threads such as the deactivate_mm() [which 
> is important even if the user-mm is NULL]. If the NULL mm dereference 
> can really trigger then it should be avoided within mm_release().
> 

Do you mean that the NULL check should be moved into mm_release()?

Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-03-08 10:07    [from the cache]
©2003-2008