diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c index ae904b58d9f5..ad2e8153c618 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -2134,6 +2134,10 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, | |||
2134 | break; | 2134 | break; |
2135 | ++datagrams; | 2135 | ++datagrams; |
2136 | 2136 | ||
2137 | /* MSG_WAITFORONE turns on MSG_DONTWAIT after one packet */ | ||
2138 | if (flags & MSG_WAITFORONE) | ||
2139 | flags |= MSG_DONTWAIT; | ||
2140 | |||
2137 | if (timeout) { | 2141 | if (timeout) { |
2138 | ktime_get_ts(timeout); | 2142 | ktime_get_ts(timeout); |
2139 | *timeout = timespec_sub(end_time, *timeout); | 2143 | *timeout = timespec_sub(end_time, *timeout); |