DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kevin Laatz <kevin.laatz@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, bruce.richardson@intel.com,
	sunil.pai.g@intel.com, Kevin Laatz <kevin.laatz@intel.com>
Subject: [dpdk-dev] [PATCH] raw/ioat: fix missing device name in idxd bus scan
Date: Thu, 27 May 2021 14:36:09 +0100	[thread overview]
Message-ID: <20210527133609.3565778-1-kevin.laatz@intel.com> (raw)

The device name is not being initialized during the idxd bus scan which
will cause segmentation faults when an appliation tries to access this
information.

This patch adds the required initialization of the device name so that it
can be read without issues.

Fixes: b7aaf417f936 ("raw/ioat: add bus driver for device scanning automatically")

Reported-by: Sunil Pai G <sunil.pai.g@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 drivers/raw/ioat/idxd_bus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/raw/ioat/idxd_bus.c b/drivers/raw/ioat/idxd_bus.c
index af400079ab..539f51b1b1 100644
--- a/drivers/raw/ioat/idxd_bus.c
+++ b/drivers/raw/ioat/idxd_bus.c
@@ -313,6 +313,7 @@ dsa_scan(void)
 
 		read_device_int(dev, "numa_node", &numa_node);
 		dev->device.numa_node = numa_node;
+		dev->device.name = dev->wq_name;
 	}
 
 	closedir(dev_dir);
-- 
2.30.2


             reply	other threads:[~2021-05-27 13:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27 13:36 Kevin Laatz [this message]
2021-05-27 14:28 ` Bruce Richardson
2021-06-04 14:11   ` Pai G, Sunil
2021-06-17  7:21     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210527133609.3565778-1-kevin.laatz@intel.com \
    --to=kevin.laatz@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=sunil.pai.g@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).