From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 644D64CA5 for ; Mon, 22 Oct 2018 08:14:10 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Oct 2018 23:14:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,411,1534834800"; d="scan'208";a="102174815" Received: from dpdk51.sh.intel.com ([10.67.110.190]) by orsmga002.jf.intel.com with ESMTP; 21 Oct 2018 23:14:08 -0700 From: Qi Zhang To: thomas@monjalon.net Cc: dev@dpdk.org, Qi Zhang Date: Mon, 22 Oct 2018 14:15:16 +0800 Message-Id: <20181022061516.45912-1-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 Subject: [dpdk-dev] [PATCH] eal: fix NULL device argument pointer reference 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: , X-List-Received-Date: Mon, 22 Oct 2018 06:14:11 -0000 dev->devargs is not initialized for PCI device, so use dev->bus to replace dev->devargs->bus to avoid segment fault when hotplug remove a PCI device. Fixes: 244d5130719c ("eal: enable hotplug on multi-process") Signed-off-by: Qi Zhang --- lib/librte_eal/common/eal_common_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c index d4b1ea70d..9d456d320 100644 --- a/lib/librte_eal/common/eal_common_dev.c +++ b/lib/librte_eal/common/eal_common_dev.c @@ -393,7 +393,7 @@ rte_dev_remove(struct rte_device *dev) return -ENOENT; } - ret = build_devargs(dev->devargs->bus->name, dev->name, "", &devargs); + ret = build_devargs(dev->bus->name, dev->name, "", &devargs); if (ret != 0) return ret; -- 2.13.6