aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Staubach <staubach@redhat.com>2006-03-17 02:04:02 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-17 10:51:25 -0500
commit85c6932ef0c7a82c309f8728ddf29768001d794e (patch)
tree7f20a727da97fcd891976c5fd3da1ba4ead3f81f
parent5b40dc780ed996162f3af8712eb03beb24dcdbef (diff)
[PATCH] nfsservctl(): remove user-triggerable printk
A user can use nfsservctl() to spam the logs. This can happen because the arguments to the nfsservctl() system call are versioned. This is a good thing. However, when a bad version is detected, the kernel prints a message and then returns an error. Signed-off-by: Peter Staubach <staubach@redhat.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/nfsctl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/nfsctl.c b/fs/nfsctl.c
index 0d4cf9486068..1c72c7f85ddc 100644
--- a/fs/nfsctl.c
+++ b/fs/nfsctl.c
@@ -98,10 +98,8 @@ asmlinkage sys_nfsservctl(int cmd, struct nfsctl_arg __user *arg, void __user *r
98 if (copy_from_user(&version, &arg->ca_version, sizeof(int))) 98 if (copy_from_user(&version, &arg->ca_version, sizeof(int)))
99 return -EFAULT; 99 return -EFAULT;
100 100
101 if (version != NFSCTL_VERSION) { 101 if (version != NFSCTL_VERSION)
102 printk(KERN_WARNING "nfsd: incompatible version in syscall.\n");
103 return -EINVAL; 102 return -EINVAL;
104 }
105 103
106 if (cmd < 0 || cmd >= sizeof(map)/sizeof(map[0]) || !map[cmd].name) 104 if (cmd < 0 || cmd >= sizeof(map)/sizeof(map[0]) || !map[cmd].name)
107 return -EINVAL; 105 return -EINVAL;