Messages in this thread | | | Date | Tue, 11 Jul 2006 01:05:48 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] sysctl: Allow /proc/sys without sys_sysctl |
| |
On Tue, 11 Jul 2006 01:52:57 -0600 ebiederm@xmission.com (Eric W. Biederman) wrote:
> 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. > > Limited to only 5 messages in case something like glibc is using sys_sysctl. > > Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> > --- > kernel/sysctl.c | 12 ++++++++++++ > 1 files changed, 12 insertions(+), 0 deletions(-) > > diff --git a/kernel/sysctl.c b/kernel/sysctl.c > index 42610e6..b7f7dcb 100644 > --- a/kernel/sysctl.c > +++ b/kernel/sysctl.c > @@ -1303,9 +1303,15 @@ int do_sysctl(int __user *name, int nlen > > asmlinkage long sys_sysctl(struct __sysctl_args __user *args) > { > + static int msg_count; > struct __sysctl_args tmp; > int error; > > + if (msg_count++ < 5) > + 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;
That'll print it five times per 4 billion calls ;)
> @@ -2688,6 +2694,12 @@ #else /* CONFIG_SYSCTL_SYSCALL */ > > asmlinkage long sys_sysctl(struct __sysctl_args __user *args) > { > + static int msg_count; > + > + if (msg_coutn++ < 5)
That'll have trouble compiling.
Go to bed, man. I'll fix it up.
- 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/
| |