mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
checkpatch: check for world-writeable sysfs/debugfs files
Exporting world writable sysfs/debugfs files is usually a bad thing. Warn about it. Signed-off-by: Dave Jones <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
c023e4734c
commit
88f8831c05
1 changed files with 5 additions and 0 deletions
|
|
@ -2897,6 +2897,11 @@ sub process {
|
|||
ERROR("lockdep_no_validate class is reserved for device->mutex.\n" . $herecurr);
|
||||
}
|
||||
}
|
||||
|
||||
if ($line =~ /debugfs_create_file.*S_IWUGO/ ||
|
||||
$line =~ /DEVICE_ATTR.*S_IWUGO/ ) {
|
||||
WARN("Exporting world writable files is usually an error. Consider more restrictive permissions.\n" . $herecurr);
|
||||
}
|
||||
}
|
||||
|
||||
# If we have no input at all, then there is nothing to report on
|
||||
|
|
|
|||
Loading…
Reference in a new issue