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]
Date:   Tue, 28 Apr 2020 12:01:15 -0400
From:   Sinan Kaya <okaya@...nel.org>
To:     Dan Carpenter <dan.carpenter@...cle.com>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     agross@...nel.org, bjorn.andersson@...aro.org, vkoul@...nel.org,
        dan.j.williams@...el.com, linux-arm-kernel@...ts.infradead.org,
        linux-arm-msm@...r.kernel.org, dmaengine@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] dmaengine: qcom_hidma: Simplify error handling path in
 hidma_probe

On 4/28/2020 8:54 AM, Dan Carpenter wrote:
>> @@ -897,7 +897,6 @@ static int hidma_probe(struct platform_device *pdev)
>>  	if (msi)
>             ^^^
> This test doesn't work.  It will call free hidma_free_msis() if the
> hidma_request_msi() call fails.  We should do:
> 
> 	if (msi) {
> 		rc = hidma_request_msi(dmadev, pdev);
> 		msi = false;
> 	}
> 
> 	if (!msi) {
> 		hidma_ll_setup_irq(dmadev->lldev, false);
> 		rc = devm_request_irq(&pdev->dev, chirq, hidma_chirq_handler,
> 				      0, "qcom-hidma", dmadev->lldev);
> 		if (rc)
> 			goto uninit;
> 	}
> 
> 

Let me clarify how this works. MSI capability is not present on all
platforms. Therefore, this is detected by an ACPI/DTS parameter called
HIDMA_MSI_CAP.

msi = hidma_test_capability(&pdev->dev, HIDMA_MSI_CAP);

Therefore,

1. Code will request MSI capability if it is present.
2. Code will fallback to plain IRQ, if MSI allocation also fails.

I hope this helps.

We need both #1 and #2 to be supported.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ