cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Denis Efremov <efremov@linux.com>
Cc: cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org
Subject: Re: [Cocci] [PATCH] coccinelle: ifnullfree: add vfree(), kvfree*() functions
Date: Wed, 2 Sep 2020 08:51:42 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2009020851310.2528@hadrien> (raw)
In-Reply-To: <20200902044059.7133-1-efremov@linux.com>



On Wed, 2 Sep 2020, Denis Efremov wrote:

> Extend the list of free functions with kvfree(), kvfree_sensitive(),
> vfree().
>
> Signed-off-by: Denis Efremov <efremov@linux.com>

Applied, thanks.

julia

> ---
>  scripts/coccinelle/free/ifnullfree.cocci | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/coccinelle/free/ifnullfree.cocci b/scripts/coccinelle/free/ifnullfree.cocci
> index 2045391e36a0..285b92d5c665 100644
> --- a/scripts/coccinelle/free/ifnullfree.cocci
> +++ b/scripts/coccinelle/free/ifnullfree.cocci
> @@ -20,8 +20,14 @@ expression E;
>  - if (E != NULL)
>  (
>    kfree(E);
> +|
> +  kvfree(E);
>  |
>    kfree_sensitive(E);
> +|
> +  kvfree_sensitive(E, ...);
> +|
> +  vfree(E);
>  |
>    debugfs_remove(E);
>  |
> @@ -42,9 +48,10 @@ position p;
>  @@
>
>  * if (E != NULL)
> -*	\(kfree@p\|kfree_sensitive@p\|debugfs_remove@p\|debugfs_remove_recursive@p\|
> +*	\(kfree@p\|kvfree@p\|kfree_sensitive@p\|kvfree_sensitive@p\|vfree@p\|
> +*         debugfs_remove@p\|debugfs_remove_recursive@p\|
>  *         usb_free_urb@p\|kmem_cache_destroy@p\|mempool_destroy@p\|
> -*         dma_pool_destroy@p\)(E);
> +*         dma_pool_destroy@p\)(E, ...);
>
>  @script:python depends on org@
>  p << r.p;
> --
> 2.26.2
>
>
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  reply	other threads:[~2020-09-02  6:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02  4:40 [Cocci] [PATCH] coccinelle: ifnullfree: add vfree(), kvfree*() functions Denis Efremov
2020-09-02  6:51 ` Julia Lawall [this message]
2020-09-02  6:22 Markus Elfring
     [not found] <99e82f65-e02e-988a-4e78-4d438ff8e28e@web.de>
2020-09-02  7:24 ` Julia Lawall

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.22.394.2009020851310.2528@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=cocci@systeme.lip6.fr \
    --cc=efremov@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).