From: "Christopher Friesen" <cfriesen@nortel.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: either bug or unnecessary code in exit_mm()
Date: Thu, 23 Mar 2006 15:34:43 -0600 [thread overview]
Message-ID: <44231473.8070709@nortel.com> (raw)
In the last few kernels (at least as far back as 2.6.10), exit_mm()
looks like this:
static void exit_mm(struct task_struct * tsk)
{
struct mm_struct *mm = tsk->mm;
mm_release(tsk, mm);
if (!mm)
return;
while mm_release() looks like this:
void mm_release(struct task_struct *tsk, struct mm_struct *mm)
{
<snip>
if (tsk->clear_child_tid && atomic_read(&mm->mm_users) > 1) {
If it's valid to call exit_mm() with tsk->mm being NULL, then it seems
like we'll get problems when we dereference it unconditionally in
mm_release().
If mm_release() is valid, then the check for !mm in exit_mm() is
unnecessary but there should probably be a comment.
Can someone tell me which one it is?
Thanks,
Chris
reply other threads:[~2006-03-23 21:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=44231473.8070709@nortel.com \
--to=cfriesen@nortel.com \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome