[PATCH] nfsservctl(): remove user-triggerable printk
authorPeter Staubach <[email protected]>
Fri, 17 Mar 2006 07:04:02 +0000 (23:04 -0800)
committerLinus Torvalds <[email protected]>
Fri, 17 Mar 2006 15:51:25 +0000 (07:51 -0800)
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 <[email protected]>
Cc: Trond Myklebust <[email protected]>
Cc: Neil Brown <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/nfsctl.c

index 0d4cf948606866f71d1807883da0afbf35968668..1c72c7f85ddc183ae24103baa80dafeee7a47a04 100644 (file)
@@ -98,10 +98,8 @@ asmlinkage sys_nfsservctl(int cmd, struct nfsctl_arg __user *arg, void __user *r
        if (copy_from_user(&version, &arg->ca_version, sizeof(int)))
                return -EFAULT;
 
-       if (version != NFSCTL_VERSION) {
-               printk(KERN_WARNING "nfsd: incompatible version in syscall.\n");
+       if (version != NFSCTL_VERSION)
                return -EINVAL;
-       }
 
        if (cmd < 0 || cmd >= sizeof(map)/sizeof(map[0]) || !map[cmd].name)
                return -EINVAL;