mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
sysctl: Warn on an empty procname element
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>
This commit is contained in:
parent
3717540377
commit
acc154691f
@ -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) ||
|
||||
|
Loading…
Reference in New Issue
Block a user