]> err.no Git - linux-2.6/blobdiff - arch/x86/kernel/tlb_uv.c
Merge branch 'sched/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[linux-2.6] / arch / x86 / kernel / tlb_uv.c
index b362913f019957c920af3d7c882d1c2a8e39952c..d0fbb7712ab05d5ae0359c0b10db4287db742d9f 100644 (file)
@@ -492,6 +492,8 @@ static ssize_t uv_ptc_proc_write(struct file *file, const char __user *user,
        long newmode;
        char optstr[64];
 
+       if (count == 0 || count > sizeof(optstr))
+               return -EINVAL;
        if (copy_from_user(optstr, user, count))
                return -EFAULT;
        optstr[count - 1] = '\0';