]> git.baikalelectronics.ru Git - kernel.git/commit
slab: Return NULL for oversized allocations
authorChristoph Lameter <cl@linux.com>
Fri, 3 May 2013 15:43:18 +0000 (15:43 +0000)
committerPekka Enberg <penberg@kernel.org>
Mon, 6 May 2013 06:24:16 +0000 (09:24 +0300)
commitcf4563a939c6d7846126e4b70565432ce406a495
tree0724efb47d735ce835709d2402de02de4dd61f07
parentbe19865706038c7e6c69cbc614adc1cf57da021c
slab: Return NULL for oversized allocations

The inline path seems to have changed the SLAB behavior for very large
kmalloc allocations with  commit d26cf5ab ("slab: Use common
kmalloc_index/kmalloc_size functions"). This patch restores the old
behavior but also adds diagnostics so that we can figure where in the
code these large allocations occur.

Reported-and-tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Christoph Lameter <cl@linux.com>
Link: http://lkml.kernel.org/r/201305040348.CIF81716.OStQOHFJMFLOVF@I-love.SAKURA.ne.jp
[ penberg@kernel.org: use WARN_ON_ONCE ]
Signed-off-by: Pekka Enberg <penberg@kernel.org>
include/linux/slab_def.h
mm/slab_common.c