Commit 7ffbbaf2 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] null-terminate the kmalloc tables

From: David Mosberger <davidm@napali.hpl.hp.com>

The cache_sizes array needs to be NULL terminated, otherwise an oversized
kmalloc request runs off the end of the table.
parent 545e7a03
...@@ -393,6 +393,7 @@ static struct { ...@@ -393,6 +393,7 @@ static struct {
} cache_names[] = { } cache_names[] = {
#define CACHE(x) { .name = "size-" #x, .name_dma = "size-" #x "(DMA)" }, #define CACHE(x) { .name = "size-" #x, .name_dma = "size-" #x "(DMA)" },
#include <linux/kmalloc_sizes.h> #include <linux/kmalloc_sizes.h>
{ 0, }
#undef CACHE #undef CACHE
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment