The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Christoph Lameter <clameter@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] fix slub krealloc()
Date: Wed, 25 Jul 2007 10:40:56 +0200	[thread overview]
Message-ID: <1185352857.4006.4.camel@johannes.berg> (raw)
In-Reply-To: <20070723143724.1d0b26eb@schroedinger.engr.sgi.com>

[-- Attachment #1: Type: text/plain, Size: 413 bytes --]


> > I think we already fixed this?

> >     Fix ZERO_OR_NULL_PTR(ZERO_SIZE_PTR)
> 
> There is no use of ZERO_OR_NULL ptr in krealloc. Linus added a check to
> ksize() instead so that ksize(NULL) returns 0 instead of failing.

However, this still doesn't fix the other corner case I pointed out:
krealloc(NULL, 0, GFP_KERNEL) will give you a NULL pointer instead of a
ZERO_SIZE_PTR afaict.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

  reply	other threads:[~2007-07-25  8:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-18 15:42 [RFC] fix slub krealloc() Johannes Berg
2007-07-23 20:32 ` Christoph Lameter
2007-07-23 20:47   ` Andrew Morton
2007-07-23 21:37     ` Christoph Lameter
2007-07-25  8:40       ` Johannes Berg [this message]
2007-07-25 18:53         ` Christoph Lameter
2007-07-26 14:08           ` Johannes Berg

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=1185352857.4006.4.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.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