Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40735
b: refs/heads/master
c: 0e009be
h: refs/heads/master
i:
  40733: 0507b03
  40731: 2df8533
  40727: 5677a2f
  40719: db5e353
  40703: b27c2e0
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Nov 6, 2006
1 parent 8a94898 commit 1be50cc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 64efade11cddc4237c1b95ea4ca18af122a7e19e
refs/heads/master: 0e009be8a0c2309f3696df70f72ef0075aa34c9c
22 changes: 21 additions & 1 deletion trunk/kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2680,13 +2680,33 @@ int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen,
asmlinkage long sys_sysctl(struct __sysctl_args __user *args)
{
static int msg_count;
struct __sysctl_args tmp;
int name[CTL_MAXNAME];
int i;

/* Read in the sysctl name for better debug message logging */
if (copy_from_user(&tmp, args, sizeof(tmp)))
return -EFAULT;
if (tmp.nlen <= 0 || tmp.nlen >= CTL_MAXNAME)
return -ENOTDIR;
for (i = 0; i < tmp.nlen; i++)
if (get_user(name[i], tmp.name + i))
return -EFAULT;

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

if (msg_count < 5) {
msg_count++;
printk(KERN_INFO
"warning: process `%s' used the removed sysctl "
"system call\n", current->comm);
"system call with ", current->comm);
for (i = 0; i < tmp.nlen; i++)
printk("%d.", name[i]);
printk("\n");
}
out:
return -ENOSYS;
}

Expand Down

0 comments on commit 1be50cc

Please sign in to comment.