LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Kenichi Okuyama" <kenichi.okuyama@gmail.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [patch] NULL pointer check for vma->vm_mm
Date: Fri, 1 Feb 2008 02:19:17 -0800	[thread overview]
Message-ID: <20080201021917.5db3448d.akpm@linux-foundation.org> (raw)
In-Reply-To: <3fd7d7a70802010024q22b4d179mf56e6d4b60e4f574@mail.gmail.com>

On Fri, 1 Feb 2008 17:24:17 +0900 "Kenichi Okuyama" <kenichi.okuyama@gmail.com> wrote:

> First of all, thank you for looking at the patch.
> 
> I do agree that if mm is NULL, system will call Oops anyway.
> However, since it's oops, it does not stop the system, nor call kdump.

That would be a huge bug in kdump?  Surely it dumps when the kernel oopses?

> By calling BUG_ON(), it'll gives us chance of calling kdump at the first chance.
> 
> Since this is very rare to happen, I thought we should capture the incident
> whenever possible. On other hand, because BUG_ON macro is very light,
> I thought this will not harm any performance...
> 
> Forgive me in advance if I was wrong.
> I still think checking mm with BUG_ON here is better than counting on Oops.

But there are probably a million potential NULL-pointer dereferences in the 
kernel.  Why single out this one?

  reply	other threads:[~2008-02-01 10:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-01  7:39 Kenichi Okuyama
2008-02-01  7:55 ` Andrew Morton
2008-02-01  8:24   ` Kenichi Okuyama
2008-02-01 10:19     ` Andrew Morton [this message]
2008-02-01 17:39       ` Kenichi Okuyama

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=20080201021917.5db3448d.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=kenichi.okuyama@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --subject='Re: [patch] NULL pointer check for vma->vm_mm' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).