tcp: make connect() mem charging friendly
Subsystems (2)
Commit 355a901e6cf1b2b763ec85caa2a9f04fbcc4ab4a ("tcp: make connect() mem charging friendly") was backported to various stable branches:
v3.10.73: e64a85197b3f tcp: make connect() mem charging friendly v3.12.40: d06381e8aac5 tcp: make connect() mem charging friendly v3.14.37: 5a8e8f482b4a tcp: make connect() mem charging friendly v3.18.11: e8f117f002ca tcp: make connect() mem charging friendly v3.13.11-ckt19: de023863df9d tcp: make connect() mem charging friendly v3.16.7-ckt9: bea5f6ef9fcb tcp: make connect() mem charging friendly
On the 3.16 branch, this has resulted in a regression for TCP Fast Open:
<https://bugs.debian.org/782515>. The BUG() at the top of tcp_transmit_skb() fires as tcp_skb_pcount(skb) == 0.
tcp_send_syn_data() does:
memcpy(syn_data->cb, syn->cb, sizeof(syn->cb));
Since commit cd7d8498c9a5 ("tcp: change tcp_skb_pcount() location") this is sufficient to set the GSO segment count correctly. But in older branches (< 3.18) the GSO segment count in skb_shared_info is used and is no longer copied by tcp_send_syn_data().
All the versions listed above, except v3.18.11, appear to have suffered this regression.
Ben.
Signature · 3 lines
Ben Hutchings Editing code like this is akin to sticking plasters on the bleeding stump of a severed limb. - me, 29 June 1999
Quoted 23 lines · Ben Hutchings
Commit
355a901e6cf1b2b763ec85caa2a9f04fbcc4ab4a("tcp: makeconnect()mem charging friendly") was backported to various stable branches:v3.10.73:
e64a85197b3ftcp: makeconnect()mem charging friendly v3.12.40:d06381e8aac5tcp: makeconnect()mem charging friendly v3.14.37:5a8e8f482b4atcp: makeconnect()mem charging friendly v3.18.11:e8f117f002catcp: makeconnect()mem charging friendly v3.13.11-ckt19:de023863df9dtcp: makeconnect()mem charging friendly v3.16.7-ckt9:bea5f6ef9fcbtcp: makeconnect()mem charging friendlyOn the 3.16 branch, this has resulted in a regression for TCP Fast Open:
<https://bugs.debian.org/782515>. TheBUG()at the top oftcp_transmit_skb()fires astcp_skb_pcount(skb)== 0.
tcp_send_syn_data()does:memcpy(syn_data->cb, syn->cb, sizeof(syn->cb));Since commit
cd7d8498c9a5("tcp: changetcp_skb_pcount()location") this is sufficient to set the GSO segment count correctly. But in older branches (< 3.18) the GSO segment count inskb_shared_infois used and is no longer copied bytcp_send_syn_data().
Quoted 5 lines
All the versions listed above, except v3.18.11, appear to have suffered this regression.
Ben.
Hi Ben
Sorry to ear that. Have you already fixed this, or are you asking for help ?
Quoted 27 lines · Eric Dumazet
Quoted 26 lines · Ben Hutchings
Commit
355a901e6cf1b2b763ec85caa2a9f04fbcc4ab4a("tcp: makeconnect()mem charging friendly") was backported to various stable branches:v3.10.73:
e64a85197b3ftcp: makeconnect()mem charging friendly v3.12.40:d06381e8aac5tcp: makeconnect()mem charging friendly v3.14.37:5a8e8f482b4atcp: makeconnect()mem charging friendly v3.18.11:e8f117f002catcp: makeconnect()mem charging friendly v3.13.11-ckt19:de023863df9dtcp: makeconnect()mem charging friendly v3.16.7-ckt9:bea5f6ef9fcbtcp: makeconnect()mem charging friendlyOn the 3.16 branch, this has resulted in a regression for TCP Fast Open:
<https://bugs.debian.org/782515>. TheBUG()at the top oftcp_transmit_skb()fires astcp_skb_pcount(skb)== 0.
tcp_send_syn_data()does:memcpy(syn_data->cb, syn->cb, sizeof(syn->cb));Since commit
cd7d8498c9a5("tcp: changetcp_skb_pcount()location") this is sufficient to set the GSO segment count correctly. But in older branches (< 3.18) the GSO segment count inskb_shared_infois used and is no longer copied bytcp_send_syn_data().All the versions listed above, except v3.18.11, appear to have suffered this regression.
Quoted 7 lines
Quoted 2 lines
Ben.
Hi Ben
Sorry to ear that. Have you already fixed this, or are you asking for help ?
That was as far as I got this morning. I can probably come up with a fix later if you don't sooner.
Ben.
Signature · 3 lines
Ben Hutchings Editing code like this is akin to sticking plasters on the bleeding stump of a severed limb. - me, 29 June 1999