From c9be20a01c7ffe2655fd660592866ddcc965572f Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 5 Jul 2013 11:54:17 +0300 Subject: [PATCH] db/fixup_kernel.sh: filter ->read/write() functions Read and write are so important and I hand edit the caller_info a bit. Don't allow random callers from outside fs/read_write.c. Signed-off-by: Dan Carpenter --- smatch_data/db/fixup_kernel.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/smatch_data/db/fixup_kernel.sh b/smatch_data/db/fixup_kernel.sh index 08246472..cd3af441 100755 --- a/smatch_data/db/fixup_kernel.sh +++ b/smatch_data/db/fixup_kernel.sh @@ -5,6 +5,8 @@ cat << EOF | sqlite3 smatch_db.sqlite /* we only care about the main ->read/write() functions. */ delete from caller_info where function = '(struct file_operations)->read' and file != 'fs/read_write.c'; delete from caller_info where function = '(struct file_operations)->write' and file != 'fs/read_write.c'; +delete from function_ptr where function = '(struct file_operations)->read'; +delete from function_ptr where function = '(struct file_operations)->write'; /* delete these function pointers which cause false positives */ delete from caller_info where function = '(struct notifier_block)->notifier_call' and type != 0; -- 2.11.4.GIT