Commit 7cba2d48 authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller

[NET]: Make {send,recv}msg return EMSGSIZE when msg_iovelen is too big, as per 1003.1

parent 3c04cba4
......@@ -1614,7 +1614,7 @@ asmlinkage long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags)
goto out;
/* do not move before msg_sys is valid */
err = -EINVAL;
err = -EMSGSIZE;
if (msg_sys.msg_iovlen > UIO_MAXIOV)
goto out_put;
......@@ -1713,7 +1713,7 @@ asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, unsigned int flag
if (!sock)
goto out;
err = -EINVAL;
err = -EMSGSIZE;
if (msg_sys.msg_iovlen > UIO_MAXIOV)
goto out_put;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment