Tag: 7c4da061f2e953df479b126b9263f0e845bce0ec

mm/slab_common.c: use kmem_cache_free()

Author: Vaishali Thakkar <vthakkar1994@gmail.com> 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 Acked-by: Christoph Lameter Cc: Pekka …

Continue reading