The patch titled Subject: mm/slab_common.c: use kmem_cache_free() has been added to the -mm tree. Its filename is mm-slab_common-use-kmem_cache_free.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-slab_common-use-kmem_cache_free.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-slab_common-use-kmem_cache_free.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Vaishali Thakkar <vthakkar1994@xxxxxxxxx> Subject: mm/slab_common.c: use kmem_cache_free() Here, free memory is allocated using kmem_cache_zalloc. So, use kmem_cache_free instead of kfree. This is done using Coccinelle and semantic patch used is as follows: @@ expression x,E,c; @@ x = \(kmem_cache_alloc\|kmem_cache_zalloc\|kmem_cache_alloc_node\)(c,...) ... when != x = E when != &x ?-kfree(x) +kmem_cache_free(c,x) Signed-off-by: Vaishali Thakkar <vthakkar1994@xxxxxxxxx> Acked-by: Christoph Lameter <cl@xxxxxxxxx> Cc: Pekka Enberg <penberg@xxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/slab_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN mm/slab_common.c~mm-slab_common-use-kmem_cache_free mm/slab_common.c --- a/mm/slab_common.c~mm-slab_common-use-kmem_cache_free +++ a/mm/slab_common.c @@ -331,7 +331,7 @@ out: out_free_cache: memcg_free_cache_params(s); - kfree(s); + kmem_cache_free(kmem_cache, s); goto out; } _ Patches currently in -mm which might be from vthakkar1994@xxxxxxxxx are mm-slab_common-use-kmem_cache_free.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html