Commit 2fb10732 authored by Eric W. Biederman's avatar Eric W. Biederman

sysctl: Warn about all uses of sys_sysctl.

Now that the glibc pthread implemenation no longers uses sysctl() users
of sysctl are as rare as hen's teeth.  So remove the glibc exception
from the warning, and use the standard printk_ratelimit instead of
rolling our own.
Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
parent 2315ffa0
...@@ -1393,15 +1393,9 @@ static ssize_t binary_sysctl(const int *name, int nlen, ...@@ -1393,15 +1393,9 @@ static ssize_t binary_sysctl(const int *name, int nlen,
static void deprecated_sysctl_warning(const int *name, int nlen) static void deprecated_sysctl_warning(const int *name, int nlen)
{ {
static int msg_count;
int i; int i;
/* Ignore accesses to kernel.version */ if (printk_ratelimit()) {
if ((nlen == 2) && (name[0] == CTL_KERN) && (name[1] == KERN_VERSION))
return;
if (msg_count < 5) {
msg_count++;
printk(KERN_INFO printk(KERN_INFO
"warning: process `%s' used the deprecated sysctl " "warning: process `%s' used the deprecated sysctl "
"system call with ", current->comm); "system call with ", current->comm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment