diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c index e1bd5d84d7bf..c699e93c33d7 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -1745,10 +1745,11 @@ asmlinkage long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags) | |||
1745 | goto out_freeiov; | 1745 | goto out_freeiov; |
1746 | ctl_len = msg_sys.msg_controllen; | 1746 | ctl_len = msg_sys.msg_controllen; |
1747 | if ((MSG_CMSG_COMPAT & flags) && ctl_len) { | 1747 | if ((MSG_CMSG_COMPAT & flags) && ctl_len) { |
1748 | err = cmsghdr_from_user_compat_to_kern(&msg_sys, ctl, sizeof(ctl)); | 1748 | err = cmsghdr_from_user_compat_to_kern(&msg_sys, sock->sk, ctl, sizeof(ctl)); |
1749 | if (err) | 1749 | if (err) |
1750 | goto out_freeiov; | 1750 | goto out_freeiov; |
1751 | ctl_buf = msg_sys.msg_control; | 1751 | ctl_buf = msg_sys.msg_control; |
1752 | ctl_len = msg_sys.msg_controllen; | ||
1752 | } else if (ctl_len) { | 1753 | } else if (ctl_len) { |
1753 | if (ctl_len > sizeof(ctl)) | 1754 | if (ctl_len > sizeof(ctl)) |
1754 | { | 1755 | { |