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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6468186b29617_682c12948c@dwillia2-xfh.jf.intel.com.notmuch>
Date:   Fri, 19 May 2023 17:46:35 -0700
From:   Dan Williams <dan.j.williams@...el.com>
To:     Robert Richter <rrichter@....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>,
        "Dan Williams" <dan.j.williams@...el.com>
CC:     <linux-cxl@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] cxl/port: Fix NULL pointer access in devm_cxl_add_port()

Robert Richter wrote:
> In devm_cxl_add_port() the port creation may fail and its associated
> pointer does not contain a valid address. During error message
> generation this invalid port address is used. Fix that wrong address
> access.
> 
> Fixes: f3cd264c4ec1 ("cxl: Unify debug messages when calling devm_cxl_add_port()")
> Signed-off-by: Robert Richter <rrichter@....com>
> ---
>  drivers/cxl/core/port.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
> index da2068475fa2..e7c284c890bc 100644
> --- a/drivers/cxl/core/port.c
> +++ b/drivers/cxl/core/port.c
> @@ -750,11 +750,10 @@ struct cxl_port *devm_cxl_add_port(struct device *host, struct device *uport,
>  
>  	parent_port = parent_dport ? parent_dport->port : NULL;
>  	if (IS_ERR(port)) {
> -		dev_dbg(uport, "Failed to add %s%s%s%s: %ld\n",
> -			dev_name(&port->dev),
> -			parent_port ? " to " : "",
> +		dev_dbg(uport, "Failed to add%s%s%s: %ld\n",
> +			parent_port ? " port to " : "",
>  			parent_port ? dev_name(&parent_port->dev) : "",
> -			parent_port ? "" : " (root port)",
> +			parent_port ? "" : " root port",
>  			PTR_ERR(port));

Looks good, applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ