mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 04:09:18 -04:00
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: 783237e8da ("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>
This commit is contained in:
committed by
David S. Miller
parent
68ad785c00
commit
f5ddcbbb40
@@ -1303,7 +1303,8 @@ struct tcp_fastopen_request {
|
||||
/* Fast Open cookie. Size 0 means a cookie request */
|
||||
struct tcp_fastopen_cookie cookie;
|
||||
struct msghdr *data; /* data in MSG_FASTOPEN */
|
||||
u16 copied; /* queued in tcp_connect() */
|
||||
size_t size;
|
||||
int copied; /* queued in tcp_connect() */
|
||||
};
|
||||
void tcp_free_fastopen_req(struct tcp_sock *tp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user