diff options
| author | Gregory Bean <gbean@codeaurora.org> | 2011-06-07 08:06:45 -0700 |
|---|---|---|
| committer | Stephen Boyd <sboyd@codeaurora.org> | 2013-09-04 14:18:05 -0700 |
| commit | 028c20aba1936bcc7c66434a232650e543442b81 (patch) | |
| tree | abc34b5196d887f5344affb245d20a491b5e4a08 | |
| parent | bd51a4b61f5c12201c1a34c88d61bcd6df15682b (diff) | |
checkpatch: close filp_open loophole.
filp_open allows people to get around the ban on sys_open.
Close the loophole.
Change-Id: I6e2be62e848cbc064e07008d0886c0d003c8be4b
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit bb181a18a813a70176f71a0c64aa572fcfbef0f0)
| -rwxr-xr-x | scripts/checkpatch.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9d02d7b58a2..c52470e7120 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3357,6 +3357,12 @@ sub process { $herecurr); } +# filp_open is a backdoor for sys_open + if ($line =~ /\b(filp_open)\b/) { + ERROR("$1 is inappropriate in kernel code.\n" . + $herecurr); + } + # read[bwl] & write[bwl] use too many barriers, use the _relaxed variants if ($line =~ /\b((?:read|write)[bwl])\b/) { ERROR("Use of $1 is deprecated: use $1_relaxed\n\t" . |
