Messages in this thread | | | Date | Tue, 30 Apr 2013 14:34:41 +0000 | From | Christoph Lameter <> | Subject | Re: [linux-next-20130422] Bug in SLAB? |
| |
On Tue, 30 Apr 2013, Tetsuo Handa wrote:
> Current diff is:
[off by one stuff okay]
> diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h > index 113ec08..be1446a 100644 > --- a/include/linux/slab_def.h > +++ b/include/linux/slab_def.h > @@ -126,6 +126,9 @@ static __always_inline void *kmalloc(size_t size, gfp_t flags) > if (!size) > return ZERO_SIZE_PTR; > > + if (size > KMALLOC_MAX_SIZE) > + goto not_found; > + > i = kmalloc_index(size);
Why is this needed? kmalloc_index should BUG() for too large allocs.
| |