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 91025A051C; Fri, 26 Jun 2020 16:41:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 539631C0B5; Fri, 26 Jun 2020 16:41:38 +0200 (CEST) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id 4F6CE1C08E; Fri, 26 Jun 2020 16:41:37 +0200 (CEST) Received: by mail-io1-f67.google.com with SMTP id e64so5132835iof.12; Fri, 26 Jun 2020 07:41:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=e8cLktkZzxur64UlIeOMaSvO1YsiNqkIJJHFQRmtjO8=; b=JpaVuQa+fEEHs2GUM0LXx6E0E+ksT7jhFQtvwhbyWBojf1C9NWAtdIa1wRxEOgtZMi Ze3o5/j69JjYW55xZPwQSRnF0ro0WjInPduLyL3vtl6Rc5qhmIWcB/Qjp2Ey8UhJEd55 8wAIszLg6EIwpf2PNhr0eM6M1qkOceDyCIuUvbvEFTh4FwwPPhXjC9VWc/muoEwrXhRf oKLhswOvyRlsPkwWrVvHkE7L0aECWuCDB5fWc6egFpywlm7gC4OruaQaBobvjAZmtBEN JWTo40rO3/z68dlczV0U0RVJUhss7lsfAo7pDT0H7XEGKoacgl7GqbjJT5CmGsi8v2gv M5Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=e8cLktkZzxur64UlIeOMaSvO1YsiNqkIJJHFQRmtjO8=; b=FWHT1BtTACqAxbacQtAohF31gSHweeueyJpAS9d2ywj8Z4oksjAT4gEy/N596k30vw xet21jx1k4VyRqKs32+bYQyfcopUw9IKUP/8/9DZ0IfAV8Pabp4By+UKn8QelBrEes+B EjJt/aVOASID86IvZfx1tFUO1w6p1wbwdHZi2PxBBtOnnvRFsjBLYc7eAnMoqB2h8nF+ yGv8e++bAY1SuCEfHJ/Cfg++HPAD11FkCba29VEkfWuPwxAAoOyH4uZjw0vFSjpq8NPp M2SDBcl8nTWOAJt8JWKB9sL+FJWPwzHRh0BIDwX7qhrdAT054wOKZy62AlCRVo0JelKA s4Fw== X-Gm-Message-State: AOAM531qro894ytQDDNfOMkNwFngsqn5Or5Rzc/6/bEzuIV7RzQ2/xIl XU7ggQWe+BPSclPQTIJ4EaAUmc2uIgkl+FSbS24= X-Google-Smtp-Source: ABdhPJx0e1s/sUlqfErwCvNixT3GSeWkk2RPYegVx26sOH/gZdIaLZxljFlPV0N0qM2uTLmy4pyLdFy9P/ek6dyMwD4= X-Received: by 2002:a02:942e:: with SMTP id a43mr3704297jai.113.1593182496674; Fri, 26 Jun 2020 07:41:36 -0700 (PDT) MIME-Version: 1.0 References: <1590396667-25632-1-git-send-email-hkalra@marvell.com> In-Reply-To: <1590396667-25632-1-git-send-email-hkalra@marvell.com> From: Jerin Jacob Date: Fri, 26 Jun 2020 20:11:20 +0530 Message-ID: To: Harman Kalra Cc: Jerin Jacob , Nithin Dabilpuram , dpdk-dev , dpdk stable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] net/octeontx2: fix seg fault on running procinfo X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, May 25, 2020 at 2:21 PM Harman Kalra wrote: > > 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 mememory. s/mememory/memory please change the subject to "common/octeontx2" > > Fixes: 5ca59711f771 ("common/octeontx2: add mailbox base support infra") > Cc: stable@dpdk.org > > Signed-off-by: Harman Kalra > --- > 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 2b7810929..6df1e8ea6 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" > #include "otx2_dev.h" > @@ -36,7 +37,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; > } > > @@ -128,7 +129,9 @@ otx2_mbox_init(struct otx2_mbox *mbox, uintptr_t hwbase, uintptr_t reg_base, > 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.18.0 >