linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Maxin John <maxin.john@gmail.com>
To: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>, Matt Mackall <mpm@selenic.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] slub: slub_def.h: needs additional check for "index"
Date: Sat, 7 May 2011 03:03:53 +0300	[thread overview]
Message-ID: <BANLkTinAw7gxg8Q6D8pK3_pnPpidQa2-bA@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1105061355020.5832@router.home>

Hi,

On Fri, May 6, 2011 at 9:56 PM, Christoph Lameter <cl@linux.com> wrote:
> The value passed to kmalloc_slab is tested before the result is used.
> kmalloc_slab() only returns -1 for values > 4MB.
>
> The size of the object is checked against SLUB_MAX size which is
> significantly smaller than 4MB. 8kb by default.
>
> So kmalloc_slab() cannot return -1 if the parameter is checked first.

Thank you very much for pointing it out. I think it's a lot more clear
for me now.

Best Regards,
Maxin

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2011-05-07  0:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06 18:28 Maxin John
2011-05-06 18:56 ` Christoph Lameter
2011-05-07  0:03   ` Maxin John [this message]

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=BANLkTinAw7gxg8Q6D8pK3_pnPpidQa2-bA@mail.gmail.com \
    --to=maxin.john@gmail.com \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mpm@selenic.com \
    --cc=penberg@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