Skip to content

Commit 6703ddf

Browse files
ebiedermLinus Torvalds
authored andcommitted
[PATCH] sysctl: remove support for CTL_ANY
There are currently no users in the kernel for CTL_ANY and it only has effect on the binary interface which is practically unused. So this complicates sysctl lookups for no good reason so just remove it. Signed-off-by: Eric W. Biederman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 2abc26f commit 6703ddf

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

include/linux/sysctl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ struct __sysctl_args {
5353

5454
/* For internal pattern-matching use only: */
5555
#ifdef __KERNEL__
56-
#define CTL_ANY -1 /* Matches any name */
5756
#define CTL_NONE 0
5857
#define CTL_UNNUMBERED CTL_NONE /* sysctl without a binary number */
5958
#endif

kernel/sysctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ static int parse_table(int __user *name, int nlen,
11701170
for ( ; table->ctl_name || table->procname; table++) {
11711171
if (!table->ctl_name)
11721172
continue;
1173-
if (n == table->ctl_name || table->ctl_name == CTL_ANY) {
1173+
if (n == table->ctl_name) {
11741174
int error;
11751175
if (table->child) {
11761176
if (ctl_perm(table, 001))

0 commit comments

Comments
 (0)