]> 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)
commita39dd4829acb15b0fd68f2ca79e41146f8ee86b8
tree448f38fc7edb9b10372b2fd0bf1abacdb3bfd80f
parentaf062786e3dabf9e77016588b191d2067f903796
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