History

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.

Eric Dumazet committed 12 years ago

Commit f5ddcbb1 parent 68ad7853 files · +13 −5Browse files

Showing the changes to include/net (1 of 3 files). Show all

Unified · Split

include/net/tcp.h+2−1
@@ -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};
1308void tcp_free_fastopen_req(struct tcp_sock *tp);1309void tcp_free_fastopen_req(struct tcp_sock *tp);
1309 1310

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t