]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: fix refilling BM pools in RX path
authorMarcin Wojtas <mw@semihalf.com>
Thu, 3 Dec 2015 14:20:51 +0000 (15:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Dec 2015 20:01:13 +0000 (15:01 -0500)
commit3aaa78529f4d5ba85fb976f43a0d1611c3bd675a
treea91116673bf5ef313005646d1f2b6cba1e35a052
parent28a22dd1c0b3f2d450a4016fa079621cbe3a1016
net: mvpp2: fix refilling BM pools in RX path

In hitherto code in case of RX buffer allocation error during refill,
original buffer is pushed to the network stack, but the amount of
available buffer pointers in BM pool is decreased.

This commit fixes the situation by moving refill call before skb_put(),
and returning original buffer pointer to the pool in case of an error.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Fixes: decc8a74c68c ("ethernet: Add new driver for Marvell Armada 375
network unit")

Cc: <stable@vger.kernel.org> # v3.18+
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2.c