*new* smatch_scripts/unlocked_paths.pl
commit11413c9990dfb63bb3a2e1bf3db4431ad364447a
authorDan Carpenter <error27@gmail.com>
Sun, 2 May 2010 21:16:57 +0000 (2 23:16 +0200)
committerDan Carpenter <error27@gmail.com>
Sun, 2 May 2010 21:16:57 +0000 (2 23:16 +0200)
tree5f1141e2c4e5982c551bc9bed34577a51814d3de
parent4f16abe8ca57628bfff8a831ce353d9186cb826e
*new* smatch_scripts/unlocked_paths.pl

I was looking for race conditions caused by not taking a lock so I wrote
this script.

Say if you are always supposed to call frob() with with @foo_lock held then
first generate a warns.txt using the --call-tree option.  Then the command
is: "unlocked_paths.pl warns.txt foo_lock frob"

It doesn't handle calling function pointers.  The base of the path will
probably be something that gets assigned to a function pointer actually.

Signed-off-by: Dan Carpenter <error27@gmail.com>
check_call_tree.c
check_locking.c
smatch.h
smatch_scripts/unlocked_paths.pl [new file with mode: 0755]