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>] [day] [month] [year] [list]
Date:	Mon, 15 Sep 2014 12:55:58 -0500
From:	Nishanth Menon <nm@...com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
CC:	<kbuild@...org>, <linux-kernel@...r.kernel.org>,
	<linux-input@...r.kernel.org>, <linux-omap@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>, Nishanth Menon <nm@...com>,
	Julia Lawal <julia.lawall@...6.fr>,
	Dan Carpenter <dan.carpenter@...cle.com>
Subject: [PATCH] Input: palmas-pwrbutton: Fix IRQ flags for using threaded handler alone.

make C=2 CHECK="scripts/coccicheck" MODE=report COCCI=scripts/coccinelle/misc/irqf_oneshot.cocci ./drivers/input/misc/palmas-pwrbutton.o
Reports:
drivers/input/misc/palmas-pwrbutton.c:213:9-29: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

Palmas powerbutton just needs threaded IRQ handler since I2C
operations are involved and there is nothing in non-threaded primary
handler we could do.

So mark the request with ONESHOT as it should have been done in these
cases.

Cc: Julia Lawal <julia.lawall@...6.fr>
Cc: Dan Carpenter <dan.carpenter@...cle.com>
Fixes: adff5962fdd2 ("Input: introduce palmas-pwrbutton")
Reported-by: kbuild test robot <fengguang.wu@...el.com>
Signed-off-by: Nishanth Menon <nm@...com>
---
 drivers/input/misc/palmas-pwrbutton.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/misc/palmas-pwrbutton.c b/drivers/input/misc/palmas-pwrbutton.c
index 4ed6f78..c0c4636 100644
--- a/drivers/input/misc/palmas-pwrbutton.c
+++ b/drivers/input/misc/palmas-pwrbutton.c
@@ -211,8 +211,8 @@ static int palmas_pwron_probe(struct platform_device *pdev)
 
 	pwron->irq = platform_get_irq(pdev, 0);
 	error = request_threaded_irq(pwron->irq, NULL, pwron_irq,
-				     IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW,
-				     dev_name(dev), pwron);
+				     IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW |
+				     IRQF_ONESHOT, dev_name(dev), pwron);
 	if (error) {
 		dev_err(dev, "Can't get IRQ for pwron: %d\n", error);
 		goto err_free_input;
-- 
1.7.9.5

--
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