OSDN Git Service

net: bgmac: Fix infinite loop in bgmac_dma_tx_add()
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 15 Jul 2016 22:42:52 +0000 (15:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Aug 2016 07:30:47 +0000 (09:30 +0200)
commit863c8bb8be39ad11f0d9d66a431b3d9ca5c11dd7
tree0e6cb330cd83c7051c5643ac4a32870e09a0af3a
parent0020fa536cc610216f80b798b9a1c9b13c3a37fb
net: bgmac: Fix infinite loop in bgmac_dma_tx_add()

[ Upstream commit e86663c475d384ab5f46cb5637e9b7ad08c5c505 ]

Nothing is decrementing the index "i" while we are cleaning up the
fragments we could not successful transmit.

Fixes: 9cde94506eacf ("bgmac: implement scatter/gather support")
Reported-by: coverity (CID 1352048)
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/bgmac.c