]> err.no Git - linux-2.6/blobdiff - arch/x86/kernel/tlb_uv.c
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
[linux-2.6] / arch / x86 / kernel / tlb_uv.c
index 7bdbf67a2d797d6de782aab761b2c0ae4447f1ef..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';
@@ -609,7 +611,7 @@ static struct bau_control * __init uv_table_bases_init(int blade, int node)
 
        uv_bau_table_bases[blade] = bau_tabp;
 
-       return bau_tabsp;
+       return bau_tabp;
 }
 
 /*