patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v2] pcap: fix memory leak in jumbo frames
@ 2016-09-20 12:08 Dror Birkman
  2016-09-20 13:12 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Dror Birkman @ 2016-09-20 12:08 UTC (permalink / raw)
  To: nicolas.pernas.maradei, ferruh.yigit; +Cc: dev, Dror Birkman, stable

If rte_pktmbuf_alloc() fails on any segment that is not the initial
segment, previously allocated mbufs are not freed.

Fixes: 6db141c91e1f ("pcap: support jumbo frames")

Cc: <stable@dpdk.org>
Signed-off-by: Dror Birkman <dror.birkman@lightcyber.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index b7a3b03..db19a66 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -229,8 +229,10 @@ eth_pcap_rx(void *queue,
 			if (unlikely(eth_pcap_rx_jumbo(pcap_q->mb_pool,
 						       mbuf,
 						       packet,
-						       header.caplen) == -1))
+						       header.caplen) == -1)) {
+				rte_pktmbuf_free(mbuf);
 				break;
+			}
 		}
 
 		mbuf->pkt_len = (uint16_t)header.caplen;
-- 
2.3.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH v2] pcap: fix memory leak in jumbo frames
  2016-09-20 12:08 [dpdk-stable] [PATCH v2] pcap: fix memory leak in jumbo frames Dror Birkman
@ 2016-09-20 13:12 ` Ferruh Yigit
  2016-09-21 10:57   ` [dpdk-stable] [dpdk-dev] " Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2016-09-20 13:12 UTC (permalink / raw)
  To: Dror Birkman, nicolas.pernas.maradei; +Cc: dev, stable

Hi Dror,

On 9/20/2016 1:08 PM, Dror Birkman wrote:
> If rte_pktmbuf_alloc() fails on any segment that is not the initial
> segment, previously allocated mbufs are not freed.
> 
> Fixes: 6db141c91e1f ("pcap: support jumbo frames")
> 
> Cc: <stable@dpdk.org>
> Signed-off-by: Dror Birkman <dror.birkman@lightcyber.com>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] pcap: fix memory leak in jumbo frames
  2016-09-20 13:12 ` Ferruh Yigit
@ 2016-09-21 10:57   ` Bruce Richardson
  0 siblings, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2016-09-21 10:57 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Dror Birkman, nicolas.pernas.maradei, dev, stable

On Tue, Sep 20, 2016 at 02:12:38PM +0100, Ferruh Yigit wrote:
> Hi Dror,
> 
> On 9/20/2016 1:08 PM, Dror Birkman wrote:
> > If rte_pktmbuf_alloc() fails on any segment that is not the initial
> > segment, previously allocated mbufs are not freed.
> > 
> > Fixes: 6db141c91e1f ("pcap: support jumbo frames")
> > 
> > Cc: <stable@dpdk.org>
> > Signed-off-by: Dror Birkman <dror.birkman@lightcyber.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
Applied to dpdk-next-net/rel_16_11

/Bruce

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-21 10:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-20 12:08 [dpdk-stable] [PATCH v2] pcap: fix memory leak in jumbo frames Dror Birkman
2016-09-20 13:12 ` Ferruh Yigit
2016-09-21 10:57   ` [dpdk-stable] [dpdk-dev] " Bruce Richardson

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).