[lkml]   [2006]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] sysctl: Scream if someone uses sys_sysctl

As far as I can tell we never use sys_sysctl so I never expect to see
these messages. But if we do see these it means that there are user
space applications that need to be fixed before we can safely
remove sys_sysctl.

Signed-off-by: Eric W. Biederman <>
Since this patch was trivial I just wipped up this incremental
version. The code compiles is all I know.

kernel/sysctl.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 42610e6..6e7f13a 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1306,6 +1306,11 @@ asmlinkage long sys_sysctl(struct __sysc
struct __sysctl_args tmp;
int error;

+ if (printk_ratelimit())
+ printk(KERN_INFO
+ "warning: process `%s' used the obsolete sysctl "
+ "system call\n", current->comm);
if (copy_from_user(&tmp, args, sizeof(tmp)))
return -EFAULT;

@@ -2688,6 +2693,10 @@ #else /* CONFIG_SYSCTL_SYSCALL */

asmlinkage long sys_sysctl(struct __sysctl_args __user *args)
+ if (printk_ratelimit())
+ printk(KERN_INFO
+ "warning: process `%s' used the removed sysctl "
+ "system call\n", current->comm);
return -ENOSYS;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-07-11 09:27    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean