Commit 111c7d82 authored by Zhang, Yanmin's avatar Zhang, Yanmin Committed by Pekka Enberg

slub: Fix bad boundary check in init_kmem_cache_nodes()

Function init_kmem_cache_nodes is incorrect when checking upper limitation of
kmalloc_caches. The breakage was introduced by commit
91efd773 ("dma kmalloc handling fixes").
Acked-by: default avatarChristoph Lameter <cl@linux-foundation.org>
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
parent 8777c793
...@@ -2153,7 +2153,7 @@ static int init_kmem_cache_nodes(struct kmem_cache *s, gfp_t gfpflags) ...@@ -2153,7 +2153,7 @@ static int init_kmem_cache_nodes(struct kmem_cache *s, gfp_t gfpflags)
int local_node; int local_node;
if (slab_state >= UP && (s < kmalloc_caches || if (slab_state >= UP && (s < kmalloc_caches ||
s > kmalloc_caches + KMALLOC_CACHES)) s >= kmalloc_caches + KMALLOC_CACHES))
local_node = page_to_nid(virt_to_page(s)); local_node = page_to_nid(virt_to_page(s));
else else
local_node = 0; local_node = 0;
......
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