[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1502101351210.18749@chino.kir.corp.google.com>
Date: Tue, 10 Feb 2015 13:51:34 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Vaishali Thakkar <vthakkar1994@...il.com>
cc: Stephen Rothwell <sfr@...b.auug.org.au>,
Christoph Lameter <cl@...ux.com>,
Pekka Enberg <penberg@...nel.org>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/slab_common: Use kmem_cache_free
On Mon, 9 Feb 2015, Vaishali Thakkar wrote:
> 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@...il.com>
Acked-by: David Rientjes <rientjes@...gle.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists