Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp259661pxk; Tue, 1 Sep 2020 23:52:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywC9Qh9+yf2oc9kaBkcl+a/IesAt+gkEGTDHb0v47mZFBXw8DM909C/RxPjVQg4vhLmwaS X-Received: by 2002:aa7:cb0e:: with SMTP id s14mr5005892edt.225.1599029575343; Tue, 01 Sep 2020 23:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599029575; cv=none; d=google.com; s=arc-20160816; b=TfBSQKa+3GbUe0MKXmdUi7GmLmeYuLn1Qs6lVl/cPXIXW2tR+lF3h709IX6JXbak5G b42CijjiW/cTG2oQPMrHwPEWGlrNmqwDD3CnddlPr19aj7XsejquGMEwke7X+By67gjp XZKN0k+98gVPZrnfIg/k07trPw5gBYY3dF4UjuNFA9PiIvNO9P9DPwgx2BywbVIi6GIF JX99g7LecHBVI3Z1ARSpwyJDpNkQSvgUso2BplKDLgiAVV5tkNy6F8RJ/xJ5giOAM3OV uAuugmsaf+aR8z8hDJtGQt6gAcmeN+HXLyCCZYS1W4yJpLDxvuyow0iSRQJIaTuTyFMR FfHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=Pxrq3L7wQ2wEW1p1xtUZ5m/7BgsgwwFRNlI2hsjNrCc=; b=tZRU0XSllDrjiCntQmyOrgtuoZf8XosL5OnAxvirdC5fEOjOw+VDVDLwdt1cQEeC7f PKZgmOVFPZJiIx81mCDrViVfrYCk/p6PAd6QWGFj52D/8Kp+IA/l9HWVaOg9Iy7PQF9F TXg92Uadu0uFRvmOo6sF7ZIbIjx+Q2g9KYV48JP4QozDMjdqScOI8OmZw3Vm+yJpEHNq SPa1FgfKhoEbrpW870e1MFjqRKqdF/guN3rYoZNw9u7iHNgrDEIAANzkc3JDQ9BKm3Pp 7fDiXS+OuAmPBQ1y6Nnart1xrY8Uch5JaJXasySsANogAwQuPyGCO9v0GTUhIrQh0kRR QBTg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oz19si2120840ejb.307.2020.09.01.23.52.32; Tue, 01 Sep 2020 23:52:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726426AbgIBGv5 (ORCPT + 99 others); Wed, 2 Sep 2020 02:51:57 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:58630 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726144AbgIBGvz (ORCPT ); Wed, 2 Sep 2020 02:51:55 -0400 X-IronPort-AV: E=Sophos;i="5.76,359,1592863200"; d="scan'208";a="357858231" Received: from abo-173-121-68.mrs.modulonet.fr (HELO hadrien) ([85.68.121.173]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 08:51:47 +0200 Date: Wed, 2 Sep 2020 08:51:42 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Denis Efremov cc: cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org Subject: Re: [PATCH] coccinelle: ifnullfree: add vfree(), kvfree*() functions In-Reply-To: <20200902044059.7133-1-efremov@linux.com> Message-ID: References: <20200902044059.7133-1-efremov@linux.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2 Sep 2020, Denis Efremov wrote: > Extend the list of free functions with kvfree(), kvfree_sensitive(), > vfree(). > > Signed-off-by: Denis Efremov 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 > >