projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3717540
)
sysctl: Warn on an empty procname element
author
Joel Granados
<j.granados@samsung.com>
Tue, 4 Jun 2024 06:29:26 +0000
(08:29 +0200)
committer
Joel Granados
<j.granados@samsung.com>
Thu, 13 Jun 2024 08:50:52 +0000
(10:50 +0200)
Add a pr_err warning in case a ctl_table is registered with a sentinel
element containing a NULL procname.
Signed-off-by: Joel Granados <j.granados@samsung.com>
fs/proc/proc_sysctl.c
patch
|
blob
|
history
diff --git
a/fs/proc/proc_sysctl.c
b/fs/proc/proc_sysctl.c
index
87396f9
..
9553e77
100644
(file)
--- a/
fs/proc/proc_sysctl.c
+++ b/
fs/proc/proc_sysctl.c
@@
-1131,6
+1131,8
@@
static int sysctl_check_table(const char *path, struct ctl_table_header *header)
struct ctl_table *entry;
int err = 0;
list_for_each_table_entry(entry, header) {
+ if (!entry->procname)
+ err |= sysctl_err(path, entry, "procname is null");
if ((entry->proc_handler == proc_dostring) ||
(entry->proc_handler == proc_dobool) ||
(entry->proc_handler == proc_dointvec) ||