Thread (9 messages) 9 messages, 4 authors, 2012-09-26

Re: [PATCH] mm/slab: Fix kmem_cache_alloc_node_trace() declaration

From: Ezequiel Garcia <hidden>
Date: 2012-09-26 10:04:47
Also in: kernel-janitors

Pekka,

On Tue, Sep 25, 2012 at 8:07 AM, Ezequiel Garcia [off-list ref] wrote:
quoted hunk ↗ jump to hunk
The bug was introduced in commit 4052147c0afa
"mm, slab: Match SLAB and SLUB kmem_cache_alloc_xxx_trace() prototype".

Cc: Pekka Enberg <penberg@kernel.org>
Reported-by: Fengguang Wu <redacted>
Signed-off-by: Ezequiel Garcia <redacted>
---
 mm/slab.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/slab.c b/mm/slab.c
index ca3849f..3409ead 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3862,10 +3862,10 @@ void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid)
 EXPORT_SYMBOL(kmem_cache_alloc_node);

 #ifdef CONFIG_TRACING
-void *kmem_cache_alloc_node_trace(struct kmem_cache *cachep,
+void *kmem_cache_alloc_node_trace(size_t size,
+                                 struct kmem_cache *cachep,
                                  gfp_t flags,
-                                 int nodeid,
-                                 size_t size)
+                                 int nodeid)
 {
        void *ret;
@@ -3887,7 +3887,7 @@ __do_kmalloc_node(size_t size, gfp_t flags, int node, unsigned long caller)
        cachep = kmem_find_general_cachep(size, flags);
        if (unlikely(ZERO_OR_NULL_PTR(cachep)))
                return cachep;
-       return kmem_cache_alloc_node_trace(cachep, flags, node, size);
+       return kmem_cache_alloc_node_trace(size, cachep, flags, node);
 }

 #if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_TRACING)
--
Please revert this patch. This fix is wrong, I'll send a proper one.

Sorry for the mess,
Ezequiel.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help