aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/proc/proc_sysctl.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index a6b62173d4c3..d82f4a8b4b80 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -59,17 +59,11 @@ out:
59 59
60static struct ctl_table *find_in_table(struct ctl_table *p, struct qstr *name) 60static struct ctl_table *find_in_table(struct ctl_table *p, struct qstr *name)
61{ 61{
62 int len;
63 for ( ; p->procname; p++) { 62 for ( ; p->procname; p++) {
64 63 if (strlen(p->procname) != name->len)
65 if (!p->procname)
66 continue;
67
68 len = strlen(p->procname);
69 if (len != name->len)
70 continue; 64 continue;
71 65
72 if (memcmp(p->procname, name->name, len) != 0) 66 if (memcmp(p->procname, name->name, name->len) != 0)
73 continue; 67 continue;
74 68
75 /* I have a match */ 69 /* I have a match */
@@ -266,10 +260,6 @@ static int scan(struct ctl_table_header *head, ctl_table *table,
266 for (; table->procname; table++, (*pos)++) { 260 for (; table->procname; table++, (*pos)++) {
267 int res; 261 int res;
268 262
269 /* Can't do anything without a proc name */
270 if (!table->procname)
271 continue;
272
273 if (*pos < file->f_pos) 263 if (*pos < file->f_pos)
274 continue; 264 continue;
275 265