raw/ioat: fix missing device name in idxd bus scan

Message ID 20210527133609.3565778-1-kevin.laatz@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series raw/ioat: fix missing device name in idxd bus scan |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-intel-Functional fail Functional Testing issues
ci/iol-intel-Performance success Performance Testing PASS
ci/github-robot success github build: passed
ci/iol-testing success Testing PASS

Commit Message

Kevin Laatz May 27, 2021, 1:36 p.m. UTC
  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(+)
  

Comments

Bruce Richardson May 27, 2021, 2:28 p.m. UTC | #1
On Thu, May 27, 2021 at 02:36:09PM +0100, Kevin Laatz wrote:
> 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>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
Sunil Pai G June 4, 2021, 2:11 p.m. UTC | #2
> -----Original Message-----
> From: Richardson, Bruce <bruce.richardson@intel.com>
> Sent: Thursday, May 27, 2021 7:58 PM
> To: Laatz, Kevin <kevin.laatz@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Pai G, Sunil <sunil.pai.g@intel.com>
> Subject: Re: [PATCH] raw/ioat: fix missing device name in idxd bus scan
> 
> On Thu, May 27, 2021 at 02:36:09PM +0100, Kevin Laatz wrote:
> > 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>
> > ---
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Tested-by: Sunil Pai G <sunil.pai.g@intel.com>
  
Thomas Monjalon June 17, 2021, 7:21 a.m. UTC | #3
> > > 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>
> > > ---
> > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> Tested-by: Sunil Pai G <sunil.pai.g@intel.com>

Applied, thanks
  

Patch

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);