[dpdk-stable] patch 'common/octeontx2: fix crash on running procinfo' has been queued to stable release 19.11.4
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Jul 24 13:59:07 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 f04eb5e26450b178b411c9b4840ef2c7ad9174f2 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra at marvell.com>
Date: Mon, 29 Jun 2020 18:56:05 +0530
Subject: [PATCH] common/octeontx2: fix crash on running procinfo
[ upstream commit 43330c4de3c768f6eedbc544f410ccff06b531a2 ]
Segmentation fault has been observed while running procinfo
with reset options i.e. --stats-reset and --xstats-reset.
Reason is procinfo runs as a secondary process and tries to
hold a lock which is part of struct mdev, which was not
allocated as part of shared memory.
Fixes: 5ca59711f771 ("common/octeontx2: add mailbox base support infra")
Signed-off-by: Harman Kalra <hkalra at marvell.com>
Acked-by: Jerin Jacob <jerinj at marvell.com>
---
drivers/common/octeontx2/otx2_mbox.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/common/octeontx2/otx2_mbox.c b/drivers/common/octeontx2/otx2_mbox.c
index c359bf42f..18bf5b88e 100644
--- a/drivers/common/octeontx2/otx2_mbox.c
+++ b/drivers/common/octeontx2/otx2_mbox.c
@@ -9,6 +9,7 @@
#include <rte_atomic.h>
#include <rte_cycles.h>
+#include <rte_malloc.h>
#include "otx2_mbox.h"
@@ -35,7 +36,7 @@ otx2_mbox_fini(struct otx2_mbox *mbox)
{
mbox->reg_base = 0;
mbox->hwbase = 0;
- free(mbox->dev);
+ rte_free(mbox->dev);
mbox->dev = NULL;
}
@@ -126,7 +127,9 @@ otx2_mbox_init(struct otx2_mbox *mbox, uintptr_t hwbase,
return -ENODEV;
}
- mbox->dev = malloc(ndevs * sizeof(struct otx2_mbox_dev));
+ mbox->dev = rte_zmalloc("mbox dev",
+ ndevs * sizeof(struct otx2_mbox_dev),
+ OTX2_ALIGN);
if (!mbox->dev) {
otx2_mbox_fini(mbox);
return -ENOMEM;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-07-24 12:53:52.740891549 +0100
+++ 0109-common-octeontx2-fix-crash-on-running-procinfo.patch 2020-07-24 12:53:48.359007801 +0100
@@ -1,8 +1,10 @@
-From 43330c4de3c768f6eedbc544f410ccff06b531a2 Mon Sep 17 00:00:00 2001
+From f04eb5e26450b178b411c9b4840ef2c7ad9174f2 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra at marvell.com>
Date: Mon, 29 Jun 2020 18:56:05 +0530
Subject: [PATCH] common/octeontx2: fix crash on running procinfo
+[ upstream commit 43330c4de3c768f6eedbc544f410ccff06b531a2 ]
+
Segmentation fault has been observed while running procinfo
with reset options i.e. --stats-reset and --xstats-reset.
Reason is procinfo runs as a secondary process and tries to
@@ -10,7 +12,6 @@
allocated as part of shared memory.
Fixes: 5ca59711f771 ("common/octeontx2: add mailbox base support infra")
-Cc: stable at dpdk.org
Signed-off-by: Harman Kalra <hkalra at marvell.com>
Acked-by: Jerin Jacob <jerinj at marvell.com>
@@ -19,7 +20,7 @@
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/common/octeontx2/otx2_mbox.c b/drivers/common/octeontx2/otx2_mbox.c
-index 2b7810929..6df1e8ea6 100644
+index c359bf42f..18bf5b88e 100644
--- a/drivers/common/octeontx2/otx2_mbox.c
+++ b/drivers/common/octeontx2/otx2_mbox.c
@@ -9,6 +9,7 @@
@@ -29,8 +30,8 @@
+#include <rte_malloc.h>
#include "otx2_mbox.h"
- #include "otx2_dev.h"
-@@ -36,7 +37,7 @@ otx2_mbox_fini(struct otx2_mbox *mbox)
+
+@@ -35,7 +36,7 @@ otx2_mbox_fini(struct otx2_mbox *mbox)
{
mbox->reg_base = 0;
mbox->hwbase = 0;
@@ -39,7 +40,7 @@
mbox->dev = NULL;
}
-@@ -128,7 +129,9 @@ otx2_mbox_init(struct otx2_mbox *mbox, uintptr_t hwbase, uintptr_t reg_base,
+@@ -126,7 +127,9 @@ otx2_mbox_init(struct otx2_mbox *mbox, uintptr_t hwbase,
return -ENODEV;
}
More information about the stable
mailing list