[dpdk-stable] patch 'net/af_packet: fix munmap on init failure' has been queued to stable release 19.11.4
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Jul 24 13:59:55 CEST 2020
Hi,
FYI, your patch has been queued to stable release 19.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 07/26/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
>From d96c627cf9e4121561524b20c11b682614a8669b Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Mon, 6 Jul 2020 20:28:02 +0800
Subject: [PATCH] net/af_packet: fix munmap on init failure
[ upstream commit b02e1742ebb5a6c23bea05c4d66b1d380bcd00eb ]
Add a missing available check and fix the wrong address passed
to munmap on init failure.
Fixes: dd6590fe2fd7 ("af_packet: fix possible memory leak")
Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
drivers/net/af_packet/rte_eth_af_packet.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 841a7009a..00387ed0a 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -804,8 +804,9 @@ error:
if (qsockfd != -1)
close(qsockfd);
for (q = 0; q < nb_queues; q++) {
- munmap((*internals)->rx_queue[q].map,
- 2 * req->tp_block_size * req->tp_block_nr);
+ if ((*internals)->rx_queue[q].map != MAP_FAILED)
+ munmap((*internals)->rx_queue[q].map,
+ 2 * req->tp_block_size * req->tp_block_nr);
rte_free((*internals)->rx_queue[q].rd);
rte_free((*internals)->tx_queue[q].rd);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-07-24 12:53:54.611171206 +0100
+++ 0157-net-af_packet-fix-munmap-on-init-failure.patch 2020-07-24 12:53:48.519010782 +0100
@@ -1,13 +1,14 @@
-From b02e1742ebb5a6c23bea05c4d66b1d380bcd00eb Mon Sep 17 00:00:00 2001
+From d96c627cf9e4121561524b20c11b682614a8669b Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Mon, 6 Jul 2020 20:28:02 +0800
Subject: [PATCH] net/af_packet: fix munmap on init failure
+[ upstream commit b02e1742ebb5a6c23bea05c4d66b1d380bcd00eb ]
+
Add a missing available check and fix the wrong address passed
to munmap on init failure.
Fixes: dd6590fe2fd7 ("af_packet: fix possible memory leak")
-Cc: stable at dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
@@ -16,10 +17,10 @@
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
-index 62945fee2..b9723e961 100644
+index 841a7009a..00387ed0a 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
-@@ -843,8 +843,9 @@ error:
+@@ -804,8 +804,9 @@ error:
if (qsockfd != -1)
close(qsockfd);
for (q = 0; q < nb_queues; q++) {
More information about the stable
mailing list