On Wed, Nov 1, 2017 at 2:10 PM, Christoph Paasch <cpaa...@apple.com> wrote: > Since commit 971f10eca186 ("tcp: better TCP_SKB_CB layout to reduce cache > line misses") IPCB/IP6CB is no more at the beginning of the tcp_skb_cb. > This means that on the output path, we need to make sure that it has > been correctly initialized to 0, as is done in tcp_transmit_skb. > > However, when going through the other code-path in TCP that can send an > skb (e.g., through tcp_v6_send_synack), we end up in a situation where > IP6CB has some of its fields set to unexpected values. Depending on the > layout of tcp_skb_cb across the different kernel-versions this can be > lastopt, flags,...
Or not use tcp_init_nondata_skb() on non fast clones, since it adds unnecessary writes and clears. tcp_make_synack() really has no business using tcp_init_nondata_skb() and could simply set th->seq = htonl(tcp_rsk(req)->snt_isn);