lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZT6Fov84g5FxrBEj@rric.localdomain>
Date:   Sun, 29 Oct 2023 17:17:38 +0100
From:   Robert Richter <rrichter@....com>
To:     Dan Williams <dan.j.williams@...el.com>
Cc:     Davidlohr Bueso <dave@...olabs.net>,
        Jonathan Cameron <jonathan.cameron@...wei.com>,
        Dave Jiang <dave.jiang@...el.com>,
        Alison Schofield <alison.schofield@...el.com>,
        Vishal Verma <vishal.l.verma@...el.com>,
        Ira Weiny <ira.weiny@...el.com>,
        Ben Widawsky <bwidawsk@...nel.org>, linux-cxl@...r.kernel.org,
        linux-kernel@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
        Terry Bowman <terry.bowman@....com>
Subject: Re: [PATCH v12 01/20] cxl/port: Fix release of RCD endpoints

On 27.10.23 18:39:28, Dan Williams wrote:
> Dan Williams wrote:
> > Robert Richter wrote:
> > > Dan,
> > [..]
> > > 
> > > delete_endpoint() is called here, but the uport etc. is not unbound.
> > > Which means this is not true:
> > > 
> > > 	if (parent->driver && !endpoint->dead) {
> > > 		...
> > > 
> > > I don't remember this with my patch. The parent is there different, so
> > > that could be the reason.
> > > 
> > > I could not yet look into more detail but wanted to let you know. Will
> > > continue.
> > 
> > Apologies, I didn't have that regression going, I think I see the issue.
> > Thanks for the heads up.
> 
> Here is the incremental fix on top of the lifetime fix:
> 
> diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
> index 6230ddfc0be8..0fe915ec2cc2 100644
> --- a/drivers/cxl/core/port.c
> +++ b/drivers/cxl/core/port.c
> @@ -1217,30 +1217,39 @@ static struct device *grandparent(struct device *dev)
>  	return NULL;
>  }
>  
> +static struct device *endpoint_host(struct cxl_port *endpoint)
> +{
> +	struct cxl_port *port = to_cxl_port(endpoint->dev.parent);
> +
> +	if (is_cxl_root(port))
> +		return port->uport_dev;
> +	return &port->dev;
> +}

Yes, that works.

Reviewed-by: Robert Richter <rrichter@....com>
Tested-by: Robert Richter <rrichter@....com>

Thanks,

-Robert

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ