Commit 61cf6931 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[sysctl] Fix breakage on systems with older glibc

As predicted during code review, the sysctl(2) changes made systems with
old glibc nearly unusable.  About every command gives a:

  warning: process `ls' used the deprecated sysctl system call with 1.4

warning in the log.

I see this on a SUSE 10.0 system with glibc 2.3.5.

Don't warn for this common case.
Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 288f02bb
...@@ -1399,6 +1399,13 @@ static void deprecated_sysctl_warning(const int *name, int nlen) ...@@ -1399,6 +1399,13 @@ static void deprecated_sysctl_warning(const int *name, int nlen)
{ {
int i; int i;
/*
* CTL_KERN/KERN_VERSION is used by older glibc and cannot
* ever go away.
*/
if (name[0] == CTL_KERN && name[1] == KERN_VERSION)
return;
if (printk_ratelimit()) { if (printk_ratelimit()) {
printk(KERN_INFO printk(KERN_INFO
"warning: process `%s' used the deprecated sysctl " "warning: process `%s' used the deprecated sysctl "
......
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