From: Robert Hancock <hancockr@shaw.ca>
To: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Christoph Lameter <clameter@sgi.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
akpm@linux-foundation.org
Subject: Re: [RFC 0/4] CONFIG_STABLE to switch off development checks
Date: Mon, 04 Jun 2007 18:38:14 -0600 [thread overview]
Message-ID: <4664B076.5000406@shaw.ca> (raw)
In-Reply-To: <fa.wiSgrIhkRNkkC7Wh6Bt3BY4z7BM@ifi.uio.no>
Dave Kleikamp wrote:
> I'm on Christoph's side here. I don't think it makes sense for any code
> to ask to allocate zero bytes of memory and expect valid memory to be
> returned.
>
> Would a compromise be to return a pointer to some known invalid region?
> This way the kmalloc(0) call would appear successful to the caller, but
> any access to the memory would result in an exception.
I would think returning 1 as the address would work here, it's not NULL
but any access to that page should still oops..
--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/
--
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>
next parent reply other threads:[~2007-06-05 0:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fa.UBCbBXgIW93M6j2F+d+umQ5+v9I@ifi.uio.no>
[not found] ` <fa.iaekQW/Par/E6eIpnL0NjEdCUxc@ifi.uio.no>
[not found] ` <fa.2BlkzuhauAATrsG1MYhPMeWMhPM@ifi.uio.no>
[not found] ` <fa.o9WA1K75HxwNnBEQDyoQMfWVpiQ@ifi.uio.no>
[not found] ` <fa.wiSgrIhkRNkkC7Wh6Bt3BY4z7BM@ifi.uio.no>
2007-06-05 0:38 ` Robert Hancock [this message]
2007-05-31 0:20 clameter
2007-06-01 14:55 ` Jeremy Fitzhardinge
2007-06-01 18:38 ` Christoph Lameter
2007-06-01 18:58 ` Jeremy Fitzhardinge
2007-06-01 20:59 ` Christoph Lameter
2007-06-01 21:24 ` Jeremy Fitzhardinge
2007-06-02 15:23 ` Dave Kleikamp
2007-06-02 16:28 ` Jeremy Fitzhardinge
2007-06-04 1:03 ` Dave Kleikamp
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=4664B076.5000406@shaw.ca \
--to=hancockr@shaw.ca \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shaggy@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox