diff options
| author | Gregory Bean <gbean@codeaurora.org> | 2011-06-07 08:06:45 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:51:46 -0700 |
| commit | fde5c031c6aec6c27c1dd276b9b6f036fdb08b39 (patch) | |
| tree | b33b644d934c5736f6f110b3164230827403a0dd /scripts/checkpatch.pl | |
| parent | b88c73213a63697e0dbe81a26b9c1687244a1e82 (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)
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Diffstat (limited to 'scripts/checkpatch.pl')
| -rwxr-xr-x | scripts/checkpatch.pl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 70596ddf22f0..6a58d2a13679 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4936,6 +4936,13 @@ sub process { $herecurr); } +# filp_open is a backdoor for sys_open + if ($line =~ /\b(filp_open)\b/) { + ERROR("FILE_OPS", + "$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("NON_RELAXED_IO", |
