diff options
Diffstat (limited to 'net/socket.c')
| -rw-r--r-- | net/socket.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c index 769c386bd428..5e8d0af3c0e7 100644 --- a/net/socket.c +++ b/net/socket.c | |||
| @@ -87,6 +87,7 @@ | |||
| 87 | #include <linux/wireless.h> | 87 | #include <linux/wireless.h> |
| 88 | #include <linux/nsproxy.h> | 88 | #include <linux/nsproxy.h> |
| 89 | #include <linux/magic.h> | 89 | #include <linux/magic.h> |
| 90 | #include <linux/slab.h> | ||
| 90 | 91 | ||
| 91 | #include <asm/uaccess.h> | 92 | #include <asm/uaccess.h> |
| 92 | #include <asm/unistd.h> | 93 | #include <asm/unistd.h> |
| @@ -2135,6 +2136,10 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, | |||
| 2135 | break; | 2136 | break; |
| 2136 | ++datagrams; | 2137 | ++datagrams; |
| 2137 | 2138 | ||
| 2139 | /* MSG_WAITFORONE turns on MSG_DONTWAIT after one packet */ | ||
| 2140 | if (flags & MSG_WAITFORONE) | ||
| 2141 | flags |= MSG_DONTWAIT; | ||
| 2142 | |||
| 2138 | if (timeout) { | 2143 | if (timeout) { |
| 2139 | ktime_get_ts(timeout); | 2144 | ktime_get_ts(timeout); |
| 2140 | *timeout = timespec_sub(end_time, *timeout); | 2145 | *timeout = timespec_sub(end_time, *timeout); |
