Skip to content

Commit c8c9aeb

Browse files
sbrivio-rhdavem330
authored andcommitted
tcp: Split BUG_ON() in tcp_tso_should_defer() into two assertions
The two conditions triggering BUG_ON() are somewhat unrelated: the tcp_skb_pcount() check is meant to catch TSO flaws, the second one checks sanity of congestion window bookkeeping. Split them into two separate BUG_ON() assertions on two lines, so that we know which one actually triggers, when they do. Signed-off-by: Stefano Brivio <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 54dc3e3 commit c8c9aeb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/ipv4/tcp_output.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1944,7 +1944,8 @@ static bool tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb,
19441944

19451945
in_flight = tcp_packets_in_flight(tp);
19461946

1947-
BUG_ON(tcp_skb_pcount(skb) <= 1 || (tp->snd_cwnd <= in_flight));
1947+
BUG_ON(tcp_skb_pcount(skb) <= 1);
1948+
BUG_ON(tp->snd_cwnd <= in_flight);
19481949

19491950
send_win = tcp_wnd_end(tp) - TCP_SKB_CB(skb)->seq;
19501951

0 commit comments

Comments
 (0)