diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/socket.c b/net/socket.c index ed50255143d5..2d5382d0de54 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -2232,14 +2232,16 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, | |||
2232 | */ | 2232 | */ |
2233 | if (MSG_CMSG_COMPAT & flags) { | 2233 | if (MSG_CMSG_COMPAT & flags) { |
2234 | err = __sys_recvmsg(sock, (struct msghdr __user *)compat_entry, | 2234 | err = __sys_recvmsg(sock, (struct msghdr __user *)compat_entry, |
2235 | &msg_sys, flags, datagrams); | 2235 | &msg_sys, flags & ~MSG_WAITFORONE, |
2236 | datagrams); | ||
2236 | if (err < 0) | 2237 | if (err < 0) |
2237 | break; | 2238 | break; |
2238 | err = __put_user(err, &compat_entry->msg_len); | 2239 | err = __put_user(err, &compat_entry->msg_len); |
2239 | ++compat_entry; | 2240 | ++compat_entry; |
2240 | } else { | 2241 | } else { |
2241 | err = __sys_recvmsg(sock, (struct msghdr __user *)entry, | 2242 | err = __sys_recvmsg(sock, (struct msghdr __user *)entry, |
2242 | &msg_sys, flags, datagrams); | 2243 | &msg_sys, flags & ~MSG_WAITFORONE, |
2244 | datagrams); | ||
2243 | if (err < 0) | 2245 | if (err < 0) |
2244 | break; | 2246 | break; |
2245 | err = put_user(err, &entry->msg_len); | 2247 | err = put_user(err, &entry->msg_len); |