From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 200D4A0518 for ; Fri, 24 Jul 2020 14:07:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 11D981C1AF; Fri, 24 Jul 2020 14:07:55 +0200 (CEST) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 11AFF1C1AD for ; Fri, 24 Jul 2020 14:07:54 +0200 (CEST) Received: by mail-wm1-f65.google.com with SMTP id c80so7756157wme.0 for ; Fri, 24 Jul 2020 05:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=A/MUU/sL7F4d0uFMvxIly1XFJPPG+dBZdDYZa4RV8p0=; b=ovQl0SAnCFUsiRYWVIpl95kKHFDqdsOSZIHCSb8muWqdJQ6cKtD99/RQkJpB0ISePw OyDiaw/JSZJu61OhVNdO4+rQD36o8OIzJfn6gQYSZK1zVyXQj9qY34zZbAGed1hit8H0 zBJ1QOqtd7ATvHwJaAtzfWrsGiukIkblFpie7hMhJl046sOC1Ome+inhXtCojFhp2TVP 8CpUdVBgcz0hC/gdlxAA1aef0x5X1cUL0eTWKM/rIcQ7TpFssjE3riaUoHWdWV8xNkm7 2uheV4pItxXneHlr23aM0qop1gf39mmHVel2ih7IdZdo+Pn77HZiH9ObGZe6sYpm2GV8 1OYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=A/MUU/sL7F4d0uFMvxIly1XFJPPG+dBZdDYZa4RV8p0=; b=Te2M3tz+EN+HmE98W2PJHDOGjafJ/mBiqEbnDVLSp8aV5vrlr3MDcJWwkvVw7+XF4g AZoVvk443bG0GQfibG/dxOyjF1VyH8RnNSWjvq61sFgJkm4hI3njdnxPad3FTPyiWwO5 FybFMNZXnCQNV1RIQtv7J8ZrYTol0pdT102/+26x09AELLSfb55ho8bBQyFLTnBCvGK/ F6mhBx+ASKWhMRM/Ov3A5s2wwO3Ozhu1B4rqHBb3+I0SNictSRobJPVLBzuZDKe9jUVL Lwp+EnFEeysrOLRaM6vBB2w4FNcMGRnMN5aT7t3ZTPsVRlCp3PwvfIYrASWzv0Wt1XNf hQCA== X-Gm-Message-State: AOAM530VufnN1HBLkRYBJBai5GFuYlpnTp46M7pmvAltDZcMu7uUuysx lI71ci+X+NcyUbSKOkRUaTY= X-Google-Smtp-Source: ABdhPJxDyDAVhSTJIBO/u0f23kQFPjxufbduhiL22tcK8oPO7M7+2+Uq+Ub1yTExlTUkCOKWSvDjcQ== X-Received: by 2002:a7b:c013:: with SMTP id c19mr8332272wmb.158.1595592473791; Fri, 24 Jul 2020 05:07:53 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id b63sm7212852wme.41.2020.07.24.05.07.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:07:53 -0700 (PDT) From: luca.boccassi@gmail.com To: Harman Kalra Cc: Jerin Jacob , dpdk stable Date: Fri, 24 Jul 2020 12:59:07 +0100 Message-Id: <20200724120030.1863487-109-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'common/octeontx2: fix crash on running procinfo' has been queued to stable release 19.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 Acked-by: Jerin Jacob --- 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 #include +#include #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 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@dpdk.org Signed-off-by: Harman Kalra Acked-by: Jerin Jacob @@ -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 #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; }