This patch fixes two bugs in fastopen : 1) The tcp_sendmsg(..., @size) argument was ignored. Code was relying on user not fooling the kernel with iovec mismatches 2) When MTU is about 64KB, tcp_send_syn_data() attempts order-5 allocations, which are likely to fail when memory gets fragmented.
Showing the changes to include/net (1 of 3 files). Show all
Unified · Split
| @@ -1303,7 +1303,8 @@ struct tcp_fastopen_request { · 1302 unmodified lines | |||
| 1303 | /* Fast Open cookie. Size 0 means a cookie request */ | 1303 | /* Fast Open cookie. Size 0 means a cookie request */ |
| 1304 | struct tcp_fastopen_cookie cookie; | 1304 | struct tcp_fastopen_cookie cookie; |
| 1305 | struct msghdr *data; /* data in MSG_FASTOPEN */ | 1305 | struct msghdr *data; /* data in MSG_FASTOPEN */ |
| 1306 | u16 copied; /* queued in tcp_connect() */ | 1306 | size_t size; |
| 1307 | int copied; /* queued in tcp_connect() */ | ||
| 1307 | }; | 1308 | }; |
| 1308 | void tcp_free_fastopen_req(struct tcp_sock *tp); | 1309 | void tcp_free_fastopen_req(struct tcp_sock *tp); |
| 1309 | 1310 | ||