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-next>] [day] [month] [year] [list]
Message-ID: <20130617134957.GA15602@amd.pavel.ucw.cz>
Date:	Mon, 17 Jun 2013 15:49:57 +0200
From:	Pavel Machek <pavel@...x.de>
To:	dzu@...x.de, hjk@...sjkoch.de, gregkh@...uxfoundation.org,
	grant.likely@...retlab.ca, rob.herring@...xeda.com,
	linux-kernel@...r.kernel.org
Cc:	trivial@...nel.org
Subject: [PATCH] fix UIO with device tree but no assigned interrupt

If device is initialized from device tree, but has no interrupt assigned,
uio will still try to request and interrupt old way, fails, and fails registration.
   
This is wrong; don't try initializing irq using platform data if device tree is
available.
    
Signed-off-by: Pavel Machek <pavel@...x.de>
Reported-by: Detlev Zundel <dzu@...x.de>
Tested-by: Detlev Zundel <dzu@...x.de>

diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
index 8fcc2c7..f709ead 100644
--- a/drivers/uio/uio_pdrv_genirq.c
+++ b/drivers/uio/uio_pdrv_genirq.c
@@ -213,7 +213,8 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)
 		goto bad0;
 	}
 
-	if (!uioinfo->irq) {
+	/* interrupts from device tree are already handled above */
+	if (!pdev->dev.of_node && !uioinfo->irq) {
 		ret = platform_get_irq(pdev, 0);
 		if (ret < 0) {
 			dev_err(&pdev->dev, "failed to get IRQ\n");

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ