mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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>
This commit is contained in:
parent
8582a50b61
commit
13611e09c2
@ -4987,6 +4987,13 @@ sub process {
|
|||||||
$herecurr);
|
$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
|
# read[bwl] & write[bwl] use too many barriers, use the _relaxed variants
|
||||||
if ($line =~ /\b((?:read|write)[bwl])\b/) {
|
if ($line =~ /\b((?:read|write)[bwl])\b/) {
|
||||||
ERROR("NON_RELAXED_IO",
|
ERROR("NON_RELAXED_IO",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user