Skip to content
Browse files

headers_check: better search for functions in headers

Some headers don't bother with "extern" in function prototypes, which
results in said prototypes being unnoticed and exported to userland.

This patch slightly improves detection of such cases by checking for C
type names as well in the beginning of a line.

Signed-off-by: Alexander Shishkin <>
Cc: Stephen Hemminger <>
Cc: Michal Marek <>
Cc: WANG Cong <>
Cc: Randy Dunlap <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Michal Marek <>
  • Loading branch information...
1 parent a1087ef commit de323f22a83b024b7432e813609c6efb74b1bbfc committed with michal42 Nov 30, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 scripts/
2 scripts/
@@ -64,7 +64,7 @@ sub check_include
sub check_declarations
- if ($line =~m/^\s*extern\b/) {
+ if ($line =~m/^(\s*extern|unsigned|char|short|int|long|void)\b/) {
printf STDERR "$filename:$lineno: " .
"userspace cannot call function or variable " .
"defined in the kernel\n";

0 comments on commit de323f2

Please sign in to comment.
Something went wrong with that request. Please try again.