--- linux-2.6.15.x86_64/fs/nfsctl.c.org +++ linux-2.6.15.x86_64/fs/nfsctl.c @@ -98,10 +98,8 @@ asmlinkage sys_nfsservctl(int cmd, struc 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; --- linux-2.6.15.x86_64/fs/compat.c.org +++ linux-2.6.15.x86_64/fs/compat.c @@ -2168,9 +2168,12 @@ asmlinkage long compat_sys_nfsservctl(in default: err = -EINVAL; - goto done; + break; } + if (err) + goto done; + oldfs = get_fs(); set_fs(KERNEL_DS); /* The __user pointer casts are valid because of the set_fs() */