[dpdk-stable] patch 'pdump: fix possible mbuf leak on failure' has been queued to LTS release 16.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Nov 13 15:49:37 CET 2017


Hi,

FYI, your patch has been queued to LTS release 16.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/15/17. So please
shout if anyone has objections.

Thanks.

Kind regards,
Luca Boccassi

---
>From 1b8810926176b5a3d5707da8cc3d135b1c97fbf2 Mon Sep 17 00:00:00 2001
From: "Ilya V. Matveychikov" <matvejchikov at gmail.com>
Date: Fri, 10 Nov 2017 16:55:16 +0300
Subject: [PATCH] pdump: fix possible mbuf leak on failure

[ upstream commit ef1d0e390e056916438ad74c4fa0333c3f09aaa6 ]

If pdump_pktmbuf_copy_data() fails it's possible to have segment leak
as rte_pktmbuf_free() only handles m_dup chain but not the seg just
allocated and yet not chained.

Fixes: 278f945402c5 ("pdump: add new library for packet capture")

Signed-off-by: Ilya V. Matveychikov <matvejchikov at gmail.com>
---
 lib/librte_pdump/rte_pdump.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c
index 596868374..e64bf598c 100644
--- a/lib/librte_pdump/rte_pdump.c
+++ b/lib/librte_pdump/rte_pdump.c
@@ -154,6 +154,8 @@ pdump_pktmbuf_copy(struct rte_mbuf *m, struct rte_mempool *mp)
 	do {
 		nseg++;
 		if (pdump_pktmbuf_copy_data(seg, m) < 0) {
+			if (seg != m_dup)
+				rte_pktmbuf_free_seg(seg);
 			rte_pktmbuf_free(m_dup);
 			return NULL;
 		}
-- 
2.11.0



More information about the stable mailing list