cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Denis Efremov <efremov@linux.com>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: cocci@systeme.lip6.fr
Subject: Re: [Cocci] Incorrect match with when != condition
Date: Wed, 17 Mar 2021 23:52:03 +0300	[thread overview]
Message-ID: <e905626c-f1f5-fb30-b823-8f27e0128983@linux.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2103172131210.2981@hadrien>



On 3/17/21 11:32 PM, Julia Lawall wrote:
> 
> 
> On Wed, 17 Mar 2021, Denis Efremov wrote:
> 
>> Hi,
>>
>> I'm trying to write the check to detect the absence of commit
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=51b2ee7d006a736a9126e8111d1f24e4fd0afaa6
>> in kernel. The pattern can be:
>>
>> @err exists@
>> identifier namlen, dchild, dparent, exp;
>> position p;
>> statement S;
>> @@
>>
>> compose_entry_fh(..., int namlen, ...)
>> {
>> 	...
>> 	if (namlen == 2) {
>> *		dchild =@p dget_parent(dparent);
>> 		... when != dparent == exp->ex_path.dentry
> 
> add when forall here.  There does exist a path that does not contain the
> dparent == exp->ex_path.dentry test.  That is the path that takesthe first
> goto out.

This solved the problem, thanks!
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

      reply	other threads:[~2021-03-17 20:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 19:56 [Cocci] Incorrect match with when != condition Denis Efremov
2021-03-17 20:32 ` Julia Lawall
2021-03-17 20:52   ` Denis Efremov [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=e905626c-f1f5-fb30-b823-8f27e0128983@linux.com \
    --to=efremov@linux.com \
    --cc=cocci@systeme.lip6.fr \
    --cc=julia.lawall@inria.fr \
    /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).