All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@parallels.com>
To: Aaron Tomlin <atomlin@redhat.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Rik <riel@redhat.com>
Subject: Re: [PATCH] mm: slab: Verify the nodeid passed to ____cache_alloc_node
Date: Fri, 22 Feb 2013 17:42:34 +0400	[thread overview]
Message-ID: <512775CA.2030603@parallels.com> (raw)
In-Reply-To: <943811281.6485888.1361484478519.JavaMail.root@redhat.com>

On 02/22/2013 02:07 AM, Aaron Tomlin wrote:
> The addition of this BUG_ON should make debugging easier.
> While I understand that this code path is "hot", surely
> it is better to assert the condition than to wait until
> some random NULL pointer dereference or page fault. If the
> caller passes an invalid nodeid, at this stage in my opinion
> it's already a BUG.
If you assert with VM_BUG_ON, it will be active on debugging kernels
only, which I believe is better suited for a hotpath.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Glauber Costa <glommer@parallels.com>
To: Aaron Tomlin <atomlin@redhat.com>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
	Rik <riel@redhat.com>
Subject: Re: [PATCH] mm: slab: Verify the nodeid passed to ____cache_alloc_node
Date: Fri, 22 Feb 2013 17:42:34 +0400	[thread overview]
Message-ID: <512775CA.2030603@parallels.com> (raw)
In-Reply-To: <943811281.6485888.1361484478519.JavaMail.root@redhat.com>

On 02/22/2013 02:07 AM, Aaron Tomlin wrote:
> The addition of this BUG_ON should make debugging easier.
> While I understand that this code path is "hot", surely
> it is better to assert the condition than to wait until
> some random NULL pointer dereference or page fault. If the
> caller passes an invalid nodeid, at this stage in my opinion
> it's already a BUG.
If you assert with VM_BUG_ON, it will be active on debugging kernels
only, which I believe is better suited for a hotpath.


  reply	other threads:[~2013-02-22 13:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1285971995.6305502.1361465165007.JavaMail.root@redhat.com>
2013-02-21 22:07 ` [PATCH] mm: slab: Verify the nodeid passed to ____cache_alloc_node Aaron Tomlin
2013-02-21 22:07   ` Aaron Tomlin
2013-02-22 13:42   ` Glauber Costa [this message]
2013-02-22 13:42     ` Glauber Costa
2013-02-25  9:11     ` Aaron Tomlin
2013-02-25  9:11       ` Aaron Tomlin

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=512775CA.2030603@parallels.com \
    --to=glommer@parallels.com \
    --cc=atomlin@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@redhat.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.