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: <1300435389-11048-1-git-send-email-eha@doredevelopment.dk>
Date:	Fri, 18 Mar 2011 09:03:09 +0100
From:	eha@...edevelopment.dk
To:	linux-kernel@...r.kernel.org
Cc:	tglx@...utronix.de, grant.likely@...retlab.ca,
	Esben Haabendal <eha@...edevelopment.dk>
Subject: [PATCH] Support IRQ_NOAUTOEN flag in set_irq_chained_handler()

From: Esben Haabendal <eha@...edevelopment.dk>

Handle IRQ_NOAUTOEN in __set_irq_handler() (ie. for
set_irq_chained_handler()) instead of just silently ignoring it, and in
the same way as is done in __setup_irq() (ie. request_irq()).

This give a more consistent interface, and also adheres better to
the rule of least surprise.

Signed-off-by: Esben Haabendal <eha@...edevelopment.dk>
---
 kernel/irq/chip.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index baa5c4a..5594b17 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -731,10 +731,13 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
 	desc->name = name;
 
 	if (handle != handle_bad_irq && is_chained) {
-		desc->status &= ~IRQ_DISABLED;
 		desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE;
-		desc->depth = 0;
-		desc->irq_data.chip->irq_startup(&desc->irq_data);
+		if (!(desc->status & IRQ_NOAUTOEN)) {
+			desc->depth = 0;
+			desc->status &= ~IRQ_DISABLED;
+			desc->irq_data.chip->irq_startup(&desc->irq_data);
+		} else
+			desc->depth = 1;
 	}
 	raw_spin_unlock_irqrestore(&desc->lock, flags);
 	chip_bus_sync_unlock(desc);
-- 
1.7.1

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