]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Fix crash in bnxt_free_tx_skbs() during tx timeout.
authorMichael Chan <mchan@broadcom.com>
Thu, 28 Jan 2016 08:11:22 +0000 (03:11 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jan 2016 01:28:39 +0000 (17:28 -0800)
commit8057c6dfc3606a2e801d46a67e637918e08929c8
tree448f38fc7edb9b10372b2fd0bf1abacdb3bfd80f
parent8ea1fba7cf4ba13b3bca4731b2cc11ca87f384e3
bnxt_en: Fix crash in bnxt_free_tx_skbs() during tx timeout.

The ring index j is not wrapped properly at the end of the ring, causing
it to reference pointers past the end of the ring.  For proper loop
termination and to access the ring properly, we need to increment j and
mask it before referencing the ring entry.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c