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)
commitd612a579771385e08f7b665063b36bfa52c03ea3
tree448f38fc7edb9b10372b2fd0bf1abacdb3bfd80f
parent8a4d4c8dde7a4119bce3fd8287dca193ff6356da
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