From mboxrd@z Thu Jan 1 00:00:00 1970 From: ydroneaud@opteya.com (Yann Droneaud) Date: Tue, 16 Feb 2016 18:01:31 +0100 Subject: [Cocci] [PATCH 0/3] coccinelle: catchup on memory allocation functions Message-ID: To: cocci@systeme.lip6.fr List-Id: cocci@systeme.lip6.fr Hi, Please find few patches that remove coccicheck's blindness regarding the following functions: - kzfree() - krealloc() - __krealloc() - devm_kmalloc() - devm_kvasprintf() - devm_kasprintf() - devm_kmalloc_array() - devm_kcalloc() - devm_kstrdup() - devm_kmemdup() - devm_get_free_pages() - free_pages() - free_page() I've ran coccicheck on drivers/staging and found no new issue, which is great, but that questions those patches' usefulness, YMMV. Regards. Yann Droneaud (3): coccinelle: also catch kzfree() issues coccinelle: recognize more devm_* memory allocation functions coccinelle: catch krealloc() on devm_*() allocated memory scripts/coccinelle/free/devm_free.cocci | 26 ++++++++++++++++++++++++++ scripts/coccinelle/free/kfree.cocci | 3 +++ scripts/coccinelle/free/kfreeaddr.cocci | 6 +++++- 3 files changed, 34 insertions(+), 1 deletion(-) -- 2.5.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755580AbcBPRvM (ORCPT ); Tue, 16 Feb 2016 12:51:12 -0500 Received: from ou.quest-ce.net ([195.154.187.82]:49433 "EHLO ou.quest-ce.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755191AbcBPRvL (ORCPT ); Tue, 16 Feb 2016 12:51:11 -0500 X-Greylist: delayed 2660 seconds by postgrey-1.27 at vger.kernel.org; Tue, 16 Feb 2016 12:51:11 EST From: Yann Droneaud To: Julia Lawall , Gilles Muller , Nicolas Palix , Michal Marek Cc: Tejun Heo , Greg Kroah-Hartman , cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org, Yann Droneaud , Daniel Thompson , Eli Billauer , Geert Uytterhoeven , Himangi Saraogi , Joe Perches , Johannes Weiner , Manish Badarkhe , Pekka Enberg , Srinivas Pandruvada , Wolfram Sang Date: Tue, 16 Feb 2016 18:01:31 +0100 Message-Id: X-Mailer: git-send-email 2.5.0 X-SA-Exim-Connect-IP: 137.194.54.98 X-SA-Exim-Mail-From: ydroneaud@opteya.com Subject: [PATCH 0/3] coccinelle: catchup on memory allocation functions X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on ou.quest-ce.net) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Please find few patches that remove coccicheck's blindness regarding the following functions: - kzfree() - krealloc() - __krealloc() - devm_kmalloc() - devm_kvasprintf() - devm_kasprintf() - devm_kmalloc_array() - devm_kcalloc() - devm_kstrdup() - devm_kmemdup() - devm_get_free_pages() - free_pages() - free_page() I've ran coccicheck on drivers/staging and found no new issue, which is great, but that questions those patches' usefulness, YMMV. Regards. Yann Droneaud (3): coccinelle: also catch kzfree() issues coccinelle: recognize more devm_* memory allocation functions coccinelle: catch krealloc() on devm_*() allocated memory scripts/coccinelle/free/devm_free.cocci | 26 ++++++++++++++++++++++++++ scripts/coccinelle/free/kfree.cocci | 3 +++ scripts/coccinelle/free/kfreeaddr.cocci | 6 +++++- 3 files changed, 34 insertions(+), 1 deletion(-) -- 2.5.0