[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1406282326010.2022@localhost6.localdomain6>
Date: Sat, 28 Jun 2014 23:28:42 +0200 (CEST)
From: Julia Lawall <julia.lawall@...6.fr>
To: SF Markus Elfring <elfring@...rs.sourceforge.net>
cc: Fabian Frederick <fabf@...net.be>, Joe Perches <joe@...ches.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, Coccinelle <cocci@...teme.lip6.fr>
Subject: Re: [Cocci] [PATCH V3] scripts/coccinelle/free: Delete NULL test
before freeing functions?
On Sat, 28 Jun 2014, SF Markus Elfring wrote:
> > Sorry but I'm not working on coccinelle ; just did a small script for kernel tree.
>
> I would appreciate a more constructive feedback for my update suggestions around
> the topic "Deletion of unnecessary checks before specific function calls".
> - Did you look at the concrete patches?
> - How do you think about the general approach?
>
> Examples:
> https://systeme.lip6.fr/pipermail/cocci/2014-March/000676.html
> http://marc.info/?l=kernel-janitors&m=139405971927100&w=2
Regular expressions do not allow taking advantage of the optimizations
provided by Coccinelle and are not easy for a reader to understand.
> https://systeme.lip6.fr/pipermail/cocci/2014-March/000677.html
> http://marc.info/?l=kernel-janitors&m=139405983727148&w=2
This is not safe due to the use of when any. You have no guarantee that
there is not a dereference of input in the matched region, or that the
value of input is still the argument value at the point of the test.
julia
--
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