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: <20250214172936.4l24mwry2efm6dyy@thinkpad>
Date: Fri, 14 Feb 2025 22:59:36 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To: Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>
Cc: Krzysztof Wilczynski <kw@...ux.com>,
	Kishon Vijay Abraham I <kishon@...nel.org>,
	Arnd Bergmann <arnd@...db.de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Lorenzo Pieralisi <lpieralisi@...nel.org>,
	Gustavo Pimentel <gustavo.pimentel@...opsys.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 5/5] misc: pci_endpoint_test: Do not use managed irq
 functions

On Mon, Feb 10, 2025 at 04:58:12PM +0900, Kunihiko Hayashi wrote:
> The pci_endpoint_test_request_irq() and pci_endpoint_test_release_irq()
> are called repeatedly by the users through pci_endpoint_test_set_irq().
> So using the managed version of IRQ functions within these functions
> has no effect.
> 
> Suggested-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>

- Mani

> ---
>  drivers/misc/pci_endpoint_test.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c
> index 8d98cd18634d..9465d2ab259a 100644
> --- a/drivers/misc/pci_endpoint_test.c
> +++ b/drivers/misc/pci_endpoint_test.c
> @@ -212,10 +212,9 @@ static void pci_endpoint_test_release_irq(struct pci_endpoint_test *test)
>  {
>  	int i;
>  	struct pci_dev *pdev = test->pdev;
> -	struct device *dev = &pdev->dev;
>  
>  	for (i = 0; i < test->num_irqs; i++)
> -		devm_free_irq(dev, pci_irq_vector(pdev, i), test);
> +		free_irq(pci_irq_vector(pdev, i), test);
>  
>  	test->num_irqs = 0;
>  }
> @@ -228,9 +227,9 @@ static int pci_endpoint_test_request_irq(struct pci_endpoint_test *test)
>  	struct device *dev = &pdev->dev;
>  
>  	for (i = 0; i < test->num_irqs; i++) {
> -		ret = devm_request_irq(dev, pci_irq_vector(pdev, i),
> -				       pci_endpoint_test_irqhandler,
> -				       IRQF_SHARED, test->name, test);
> +		ret = request_irq(pci_irq_vector(pdev, i),
> +				  pci_endpoint_test_irqhandler, IRQF_SHARED,
> +				  test->name, test);
>  		if (ret)
>  			goto fail;
>  	}
> -- 
> 2.25.1
> 

-- 
மணிவண்ணன் சதாசிவம்

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ