diff options
author | Eric Dumazet <edumazet@google.com> | 2014-02-20 13:09:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-22 00:05:21 -0500 |
commit | f5ddcbbb40aa0ba7fbfe22355d287603dbeeaaac (patch) | |
tree | 891b56a6481cf19747018c832be557613e5b5a02 /include/net | |
parent | 68ad785c007246490b220ae958b544671339059b (diff) |
net-tcp: fastopen: fix high order allocations
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.
Fixes: 783237e8daf13 ("net-tcp: Fast Open client - sending SYN-data")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Tested-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/tcp.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 56fc366da6d5..8c4dd63134d4 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -1303,7 +1303,8 @@ struct tcp_fastopen_request { | |||
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 | ||