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] [thread-next>] [day] [month] [year] [list]
Message-ID: <16efa89e-6a9d-4e9a-9020-239b9750119d@quicinc.com>
Date: Wed, 10 Jan 2024 08:46:40 +0530
From: Krishna Kurapati PSSNV <quic_kriskura@...cinc.com>
To: Bjorn Andersson <quic_bjorande@...cinc.com>,
        Wesley Cheng
	<quic_wcheng@...cinc.com>,
        Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
        "Johan
 Hovold" <johan@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>
CC: <linux-arm-msm@...r.kernel.org>, <linux-usb@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Conor Dooley
	<conor+dt@...nel.org>, Felipe Balbi <balbi@...nel.org>,
        Rob Herring
	<robh+dt@...nel.org>,
        Krzysztof Kozlowski
	<krzysztof.kozlowski+dt@...aro.org>,
        Greg Kroah-Hartman
	<gregkh@...uxfoundation.org>,
        Bjorn Andersson <andersson@...nel.org>,
        "Philipp Zabel" <p.zabel@...gutronix.de>
Subject: Re: [PATCH 07/12] usb: dwc3: qcom: Instantiate dwc3 core directly



On 10/17/2023 8:41 AM, Bjorn Andersson wrote:
> The Qualcomm DWC3 glue builds up a platform_device programmatically in
> order to probe the DWC3 core when running off ACPI data. But with the
> newly introduced support for instantiating the core directly from the
> glue, this code can be replaced with a single function call.
> 



> @@ -942,7 +889,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
>   	if (np)
>   		ret = dwc3_qcom_of_register_core(pdev);
>   	else
> -		ret = dwc3_qcom_acpi_register_core(pdev);
> +		ret = dwc3_qcom_probe_core(pdev, qcom);
>   
>   	if (ret) {
>   		dev_err(dev, "failed to register DWC3 Core, err=%d\n", ret);
> @@ -986,10 +933,10 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
>   interconnect_exit:
>   	dwc3_qcom_interconnect_exit(qcom);
>   depopulate:
> -	if (np)
> +	if (qcom->dwc_dev)
>   		of_platform_depopulate(&pdev->dev);
>   	else
> -		platform_device_put(pdev);
> +		dwc3_remove(qcom->dwc);

Hi Bjorn

  I was testing this patch and I suspect there is one issue.

  In the event dwc3_qcom_probe_core fails because dwc3_probe failed, 
then the variable (qcom->dwc) is NULL. We then exercise the depopulate 
path and we call dwc_remove(NULL) causing a crash.

Regards,
Krishna,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ