From: Ingo Molnar <mingo@elte.hu>
To: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"G. Vaughan" <gvaughan@jpl.nasa.gov>,
Andrew Morton <akpm@osdl.org>,
Jeremy Fitzhardinge <jeremy@goop.org>
Subject: Re: [PATCH] Fix check after use in kernel/exit.c
Date: Sat, 8 Mar 2008 09:53:22 +0100 [thread overview]
Message-ID: <20080308085322.GA29628@elte.hu> (raw)
In-Reply-To: <20080308083637.GA23555@elte.hu>
* 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().
Ingo
next prev parent reply other threads:[~2008-03-08 8:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-08 8:11 [PATCH] Fix check after use in kernel/exit.c WANG Cong
2008-03-08 8:36 ` Ingo Molnar
2008-03-08 8:53 ` Ingo Molnar [this message]
2008-03-08 8:58 ` WANG Cong
2008-03-09 11:48 ` Ingo Molnar
2008-03-10 8:23 ` WANG Cong
2008-03-10 9:13 ` Ingo Molnar
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=20080308085322.GA29628@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=gvaughan@jpl.nasa.gov \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.