From 06ad363d445ff084a625c0e1281c9dec55e9fcc2 Mon Sep 17 00:00:00 2001 From: Hepson Sanchez Date: Wed, 10 Jul 2019 17:52:57 -0700 Subject: [PATCH 1/2] Revert "checkpatch: close filp_open loophole." This reverts commit 54678ad02c7af81ae5c66d094fa5c41c71a82717. Change-Id: I14a32c6c446026769e3d27f0d04b10d0d141b27d Signed-off-by: Hepson Sanchez --- scripts/checkpatch.pl | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3a8ac37d1d26..6efd971b32d2 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5686,13 +5686,6 @@ 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", From 81b647f140edff4638530b4c4f840ab6c8e231bc Mon Sep 17 00:00:00 2001 From: Hepson Sanchez Date: Wed, 10 Jul 2019 17:54:08 -0700 Subject: [PATCH 2/2] Revert "checkpatch: forbid filesystem accesses from within the kernel." This reverts commit f9d5afd1b560ee0c9d48c0be20071648662a535a. Change-Id: I6a9671b120c0ac855689a95dac348f34286fcfe5 Signed-off-by: Hepson Sanchez --- scripts/checkpatch.pl | 8 -------- 1 file changed, 8 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 6efd971b32d2..6adfa377fbce 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5679,13 +5679,6 @@ sub process { "Avoid line continuations in quoted strings\n" . $herecurr); } -# sys_open/read/write/close are not allowed in the kernel - if ($line =~ /\b(sys_(?:open|read|write|close))\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", @@ -5705,7 +5698,6 @@ sub process { "with appropriate memory barriers instead.\n" . $herecurr); } - # warn about #if 0 if ($line =~ /^.\s*\#\s*if\s+0\b/) { WARN("IF_0",