diff options
author | Jeff Garzik <jgarzik@pretzel.yyz.us> | 2005-06-22 21:07:28 +0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-22 21:07:28 +0400 |
commit | ff40c6d3d1437ecdf295b8e39adcb06c3d6021ef (patch) | |
tree | 3666d029b4bd4df2909dbefd9c7a09e6042b7d32 /arch/sparc64/solaris | |
parent | 8bf62ecee58360749c5f0e68bc97d5e02a6816b1 (diff) | |
parent | 2a5a68b840cbab31baab2d9b2e1e6de3b289ae1e (diff) | |
download | linux-ff40c6d3d1437ecdf295b8e39adcb06c3d6021ef.tar.xz |
Merge upstream kernel changes into 'C/H/S support' branch of libata.
Diffstat (limited to 'arch/sparc64/solaris')
-rw-r--r-- | arch/sparc64/solaris/socket.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sparc64/solaris/socket.c b/arch/sparc64/solaris/socket.c index ec8e074c4eac..06740582717e 100644 --- a/arch/sparc64/solaris/socket.c +++ b/arch/sparc64/solaris/socket.c @@ -317,8 +317,10 @@ asmlinkage int solaris_sendmsg(int fd, struct sol_nmsghdr __user *user_msg, unsi unsigned long *kcmsg; compat_size_t cmlen; - if(kern_msg.msg_controllen > sizeof(ctl) && - kern_msg.msg_controllen <= 256) { + if (kern_msg.msg_controllen <= sizeof(compat_size_t)) + return -EINVAL; + + if(kern_msg.msg_controllen > sizeof(ctl)) { err = -ENOBUFS; ctl_buf = kmalloc(kern_msg.msg_controllen, GFP_KERNEL); if(!ctl_buf) |