From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7A904A034C for ; Fri, 19 Aug 2022 20:37:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B11442C19; Fri, 19 Aug 2022 20:36:48 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id ED8A8410E8; Fri, 19 Aug 2022 20:36:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660934189; x=1692470189; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pI7mB1T3Nod5zZ5sDhujEhtJvwLoXIZ8ZKg3IqlslJY=; b=BUlTcFjgoPDwIAqwVLK7ny8MOr0ZPr15R4EB96rdlzYLLIe3iPUYezRL +VEZ7VGjMKnMX2sU4M4NLBmFaeRcJnCecGs7TC/0sDorqCd584LjikojI sThaRyLy6et7p/6B9uwNhuvVjf1afwRyT6VWQS2NONn8qUT8aob3H/vVy 8xaiuAmXwZ1lUrn/N7stwdrhw3r0dQrjk0ssczSQyT0HH/yHgYEi8Y9iK l2KbXKcX93LO3s4+stkeXZh/zVljAE2tin/rj2ptcQjZIKFwE6syCjc4I DvWDjWU/82jXy07J8NNk9ILbTi5uAcFh1vgj8bKcWx78e5soNXBaVtQoJ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10444"; a="319107348" X-IronPort-AV: E=Sophos;i="5.93,248,1654585200"; d="scan'208";a="319107348" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2022 11:36:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,248,1654585200"; d="scan'208";a="608296373" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orsmga002.jf.intel.com with ESMTP; 19 Aug 2022 11:36:28 -0700 From: Hernan Vargas To: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas , stable@dpdk.org Subject: [PATCH v2 37/37] baseband/acc100: reset pointer after rte_free Date: Fri, 19 Aug 2022 19:31:57 -0700 Message-Id: <20220820023157.189047-38-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220820023157.189047-1-hernan.vargas@intel.com> References: <20220820023157.189047-1-hernan.vargas@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Set local pointer to NULL after rte_free. This needs to be set explicitly since logic may check for null pointers. Fixes: 060e7672930 ("baseband/acc100: add queue configuration") Cc: stable@dpdk.org Signed-off-by: Hernan Vargas --- drivers/baseband/acc100/rte_acc100_pmd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c index be4c1d07ed..7755d6402f 100644 --- a/drivers/baseband/acc100/rte_acc100_pmd.c +++ b/drivers/baseband/acc100/rte_acc100_pmd.c @@ -793,6 +793,9 @@ acc100_dev_close(struct rte_bbdev *dev) rte_free(d->sw_rings_base); rte_free(d->harq_layout); d->sw_rings_base = NULL; + d->tail_ptrs = NULL; + d->info_ring = NULL; + d->harq_layout = NULL; } /* Ensure all in flight HW transactions are completed */ usleep(ACC100_LONG_WAIT); -- 2.37.1