[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BANLkTinAw7gxg8Q6D8pK3_pnPpidQa2-bA@mail.gmail.com>
Date: Sat, 7 May 2011 03:03:53 +0300
From: Maxin John <maxin.john@...il.com>
To: Christoph Lameter <cl@...ux.com>
Cc: Pekka Enberg <penberg@...nel.org>, Matt Mackall <mpm@...enic.com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] slub: slub_def.h: needs additional check for "index"
Hi,
On Fri, May 6, 2011 at 9:56 PM, Christoph Lameter <cl@...ux.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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists