From: David Rientjes <rientjes@google.com>
To: Vaishali Thakkar <vthakkar1994@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/slab_common: Use kmem_cache_free
Date: Tue, 10 Feb 2015 13:51:34 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.2.10.1502101351210.18749@chino.kir.corp.google.com> (raw)
In-Reply-To: <20150209052835.GA3559@vaishali-Ideapad-Z570>
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@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
--
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>
prev parent reply other threads:[~2015-02-10 21:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-09 5:28 Vaishali Thakkar
2015-02-09 14:53 ` Christoph Lameter
2015-02-10 21:51 ` David Rientjes [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.10.1502101351210.18749@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=vthakkar1994@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox