From: Eric W. Biederman 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 Signed-off-by: Andrew Morton --- kernel/sysctl.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff -puN kernel/sysctl.c~sysctl-scream-if-someone-uses-sys_sysctl kernel/sysctl.c --- a/kernel/sysctl.c~sysctl-scream-if-someone-uses-sys_sysctl +++ a/kernel/sysctl.c @@ -1207,8 +1207,16 @@ int do_sysctl(int __user *name, int nlen asmlinkage long sys_sysctl(struct __sysctl_args __user *args) { struct __sysctl_args tmp; + static int msg_count; int error; + if (msg_count < 5) { + msg_count++; + 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; @@ -2475,6 +2483,14 @@ int sysctl_ms_jiffies(ctl_table *table, asmlinkage long sys_sysctl(struct __sysctl_args __user *args) { + static int msg_count; + + if (msg_count < 5) { + msg_count++; + printk(KERN_INFO + "warning: process `%s' used the removed sysctl " + "system call\n", current->comm); + } return -ENOSYS; } _