Skip to content

Commit

Permalink
sysctl: Warn about all uses of sys_sysctl.
Browse files Browse the repository at this point in the history
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: Eric W. Biederman <ebiederm@xmission.com>
  • Loading branch information
Eric W. Biederman committed Nov 12, 2009
1 parent 2315ffa commit 2fb1073
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions kernel/sysctl_binary.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 int msg_count;
int i;

/* Ignore accesses to kernel.version */
if ((nlen == 2) && (name[0] == CTL_KERN) && (name[1] == KERN_VERSION))
return;

if (msg_count < 5) {
msg_count++;
if (printk_ratelimit()) {
printk(KERN_INFO
"warning: process `%s' used the deprecated sysctl "
"system call with ", current->comm);
Expand Down

0 comments on commit 2fb1073

Please sign in to comment.