projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b6f075
)
slab: warn on zero-length allocations
author
Christoph Lameter
<clameter@sgi.com>
Thu, 17 May 2007 05:10:53 +0000
(22:10 -0700)
committer
Linus Torvalds
<torvalds@woody.linux-foundation.org>
Thu, 17 May 2007 12:23:03 +0000
(
05:23
-0700)
slub warns on this, and we're working on making kmalloc(0) return NULL.
Let's make slab warn as well so our testers detect such callers more
rapidly.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slab.c
patch
|
blob
|
blame
|
history
diff --git
a/mm/slab.c
b/mm/slab.c
index 12344432e201f0e4267a6541dd48f24724ff222d..2043102c0425ecb711f994c9e201e5765c11ab2b 100644
(file)
--- a/
mm/slab.c
+++ b/
mm/slab.c
@@
-789,6
+789,7
@@
static inline struct kmem_cache *__find_general_cachep(size_t size,
*/
BUG_ON(malloc_sizes[INDEX_AC].cs_cachep == NULL);
#endif
+ WARN_ON_ONCE(size == 0);
while (size > csizep->cs_size)
csizep++;