[RFC PATCH 02/13] scripts: coccinelle: adapt to find list_for_each_entry nospec issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These changes are just temporary to illustrate how I composed the list
of code locations mentioned here.
While for example the usage of &c->member is currently safe to use,
it is an issue if c is set to NULL when the terminating condition is
met.

Signed-off-by: Jakob Koschel <jakobkoschel@xxxxxxxxx>
---
 .../coccinelle/iterators/use_after_iter.cocci | 24 -------------------
 1 file changed, 24 deletions(-)

diff --git a/scripts/coccinelle/iterators/use_after_iter.cocci b/scripts/coccinelle/iterators/use_after_iter.cocci
index 676edd562eef..01563a242f00 100644
--- a/scripts/coccinelle/iterators/use_after_iter.cocci
+++ b/scripts/coccinelle/iterators/use_after_iter.cocci
@@ -91,43 +91,19 @@ list_for_each_entry(c,...) S
 |
 list_for_each_entry_reverse(c,...) S
 |
-list_for_each_entry_continue(c,...) S
-|
-list_for_each_entry_continue_reverse(c,...) S
-|
-list_for_each_entry_from(c,...) S
-|
 list_for_each_entry_safe(c,...) S
 |
 list_for_each_entry_safe(x,c,...) S
 |
-list_for_each_entry_safe_continue(c,...) S
-|
-list_for_each_entry_safe_continue(x,c,...) S
-|
-list_for_each_entry_safe_from(c,...) S
-|
-list_for_each_entry_safe_from(x,c,...) S
-|
 list_for_each_entry_safe_reverse(c,...) S
 |
 list_for_each_entry_safe_reverse(x,c,...) S
 |
 hlist_for_each_entry(c,...) S
 |
-hlist_for_each_entry_continue(c,...) S
-|
-hlist_for_each_entry_from(c,...) S
-|
 hlist_for_each_entry_safe(c,...) S
 |
-list_remove_head(x,c,...)
-|
-list_entry_is_head(c,...)
-|
 sizeof(<+...c...+>)
-|
- &c->member
 |
 T c;
 |
-- 
2.25.1




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux