* [patch] dpaa_eth: small leak on error
@ 2017-02-16 9:56 Dan Carpenter
2017-02-17 17:19 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-02-16 9:56 UTC (permalink / raw)
To: Madalin Bucur; +Cc: netdev, kernel-janitors
This should be >= instead of > here. It means that we don't increment
the free count enough so it becomes off by one.
Fixes: 9ad1a3749333 ("dpaa_eth: add support for DPAA Ethernet")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Applies to -net tree.
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 25a14a3fe784..bc5a3347fd4a 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -1666,7 +1666,7 @@ static struct sk_buff *sg_fd_to_skb(const struct dpaa_priv *priv,
free_buffers:
/* compensate sw bpool counter changes */
- for (i--; i > 0; i--) {
+ for (i--; i >= 0; i--) {
dpaa_bp = dpaa_bpid2pool(sgt[i].bpid);
if (dpaa_bp) {
count_ptr = this_cpu_ptr(dpaa_bp->percpu_count);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-17 17:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-16 9:56 [patch] dpaa_eth: small leak on error Dan Carpenter
2017-02-17 17:19 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).