Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca9aed1d authored by Gregory Bean's avatar Gregory Bean Committed by Bryan Huntsman
Browse files

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: default avatarGregory Bean <gbean@codeaurora.org>
(cherry picked from commit bb181a18a813a70176f71a0c64aa572fcfbef0f0)
Signed-off-by: default avatarStepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: default avatarRishabh Bhatnagar <rishabhb@codeaurora.org>
parent c77f1b0e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -5392,6 +5392,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",