Messages in this thread Patch in this message | | | From | (Eric W. Biederman) | Subject | [PATCH] sysctl: Scream if someone uses sys_sysctl | Date | Tue, 11 Jul 2006 01:23:45 -0600 |
| |
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 <ebiederm@xmission.com> ---
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; } -- 1.4.1.gac83a - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |