Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sfc: remove incorrect EFX_BUG_ON_PARANOID check

write_count and insert_count can wrap around, making > check invalid.

Fixes: 70b33fb0ddec827cbbd14cdc664fc27b2ef4a6b6 ("sfc: add support for
skb->xmit_more").

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jon Cooper and committed by
David S. Miller
8fc96351 7c1c97d5

-4
-4
drivers/net/ethernet/sfc/tx.c
··· 343 343 unsigned short dma_flags; 344 344 int i = 0; 345 345 346 - EFX_BUG_ON_PARANOID(tx_queue->write_count > tx_queue->insert_count); 347 - 348 346 if (skb_shinfo(skb)->gso_size) 349 347 return efx_enqueue_skb_tso(tx_queue, skb); 350 348 ··· 1255 1257 1256 1258 /* Find the packet protocol and sanity-check it */ 1257 1259 state.protocol = efx_tso_check_protocol(skb); 1258 - 1259 - EFX_BUG_ON_PARANOID(tx_queue->write_count > tx_queue->insert_count); 1260 1260 1261 1261 rc = tso_start(&state, efx, skb); 1262 1262 if (rc)