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 BC8EE4318E for ; Tue, 17 Oct 2023 18:46:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B81042DFA; Tue, 17 Oct 2023 18:46:37 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 73D5642DA7; Tue, 17 Oct 2023 18:46:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697561194; x=1729097194; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MFfk0r4DuerpVXOqGkvkA0gFyRJIFD0wrUQpA0wAnYM=; b=YjNMK92Ow16FCRYvBvXb32ifGyOcKLYCX4tK4RL2vAVNFsaIyrOKubzA rBvSX1MuF1ZDiUu5ufq3+6LfRccPTd8tKtwicrJqxr6x2yCwBpPpugvpU Z0h8I/9Xtw5i46TCNRVp1UXHXvnIHZ2WSFYMdi7dj7pcFXZuB+jX05Qc7 jKXgBQ0qmoFnVQyhKJ9tYdrdz4v1fxEn4TMSUrobGsM9NO6On+Tow/AYo c/UDVyZOjITgq9uuXe5GJNq1L7FI/E0Z97eA529OVbpxI1P9vTytwFkTI km44ZcSLSRHrT8lzDcgSCM0m++qYeZ+DtaY62NIDYO/2HM5NTyh5K7VxW A==; X-IronPort-AV: E=McAfee;i="6600,9927,10866"; a="388688413" X-IronPort-AV: E=Sophos;i="6.03,232,1694761200"; d="scan'208";a="388688413" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2023 09:46:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10866"; a="872640587" X-IronPort-AV: E=Sophos;i="6.03,232,1694761200"; d="scan'208";a="872640587" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.41]) by fmsmga002.fm.intel.com with ESMTP; 17 Oct 2023 09:46:30 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , mattias.ronnblom@ericsson.com, stable@dpdk.org, Jerin Jacob Subject: [PATCH v3 2/4] event/dsw: fix missing device pointer Date: Tue, 17 Oct 2023 17:46:08 +0100 Message-Id: <20231017164610.191852-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231017164610.191852-1-bruce.richardson@intel.com> References: <20231016151713.711965-1-bruce.richardson@intel.com> <20231017164610.191852-1-bruce.richardson@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 Initialize the "dev" pointer in the eventdev structure so it can be returned in calls to "rte_event_dev_info_get()" and avoid potential crashes due to a NULL value being passed to "rte_dev_name()" Fixes: 46a186b1f0c5 ("event/dsw: add device registration and build system") Cc: mattias.ronnblom@ericsson.com Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- drivers/event/dsw/dsw_evdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c index 785c12f61f..44da3c60d1 100644 --- a/drivers/event/dsw/dsw_evdev.c +++ b/drivers/event/dsw/dsw_evdev.c @@ -440,6 +440,7 @@ dsw_probe(struct rte_vdev_device *vdev) return -EFAULT; dev->dev_ops = &dsw_evdev_ops; + dev->dev = &vdev->device; dev->enqueue = dsw_event_enqueue; dev->enqueue_burst = dsw_event_enqueue_burst; dev->enqueue_new_burst = dsw_event_enqueue_new_burst; -- 2.39.2