public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Robin Getz <rgetz@blackfin.uclinux.org>
Cc: dhowells@redhat.com, "Greg Ungerer" <gerg@snapgear.com>,
	linux-kernel@vger.kernel.org, Bryan Wu <bryan.wu@analog.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Hennerich, Michael" <Michael.Hennerich@analog.com>
Subject: Re: [PATCH] mm/nommu.c - return 0 from kobjsize with invalid objects
Date: Tue, 22 Apr 2008 22:35:10 +0100	[thread overview]
Message-ID: <8682.1208900110@redhat.com> (raw)
In-Reply-To: <200804221356.15748.rgetz@blackfin.uclinux.org>

Robin Getz <rgetz@blackfin.uclinux.org> wrote:

> +	if (!objp || !((page = virt_to_page(objp))) || (unsigned long)objp >= memory_end)

You should probably do the additional test before calling virt_to_page(), just
in case the illegal value you've rejected would otherwise break virt_to_page()
(not very likely, but...).  For valid addresses, you've got to do all the
tests anyway.

David

  reply	other threads:[~2008-04-22 21:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-22 17:56 [PATCH] mm/nommu.c - return 0 from kobjsize with invalid objects Robin Getz
2008-04-22 21:35 ` David Howells [this message]
2008-04-23 18:58   ` Robin Getz
2008-04-24 11:28     ` David Howells

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=8682.1208900110@redhat.com \
    --to=dhowells@redhat.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=akpm@linux-foundation.org \
    --cc=bryan.wu@analog.com \
    --cc=gerg@snapgear.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rgetz@blackfin.uclinux.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