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: <200609220643.07750.david-b@pacbell.net>
Date:	Fri, 22 Sep 2006 06:43:07 -0700
From:	David Brownell <david-b@...bell.net>
To:	Linux Kernel list <linux-kernel@...r.kernel.org>
Cc:	tglx@...utronix.de, mingo@...hat.com
Subject: [patch 2.6.18] genirq: remove oops with fasteoi irq_chip descriptors

The irq handler code can oops when used with an irq_chip with just
enable/disable/eoi methods, appropriate for handle_fasteoi_irq(),
either by (a) uninstalling, or (b) using it with a chained handler.

The problem was that the original code expected there would always
be mask/unmask/ack methods, and the fix is to instead use methods
which are always present and which more closely correspond to the
flag manipulation being done.

Signed-off-by: David Brownell <dbrownell@...rs.sourceforge.net>

--- d26.rc4test.orig/kernel/irq/chip.c	2006-09-21 16:41:11.000000000 -0700
+++ d26.rc4test/kernel/irq/chip.c	2006-09-21 18:04:07.000000000 -0700
@@ -482,10 +482,8 @@ __set_irq_handler(unsigned int irq,
 
 	/* Uninstall? */
 	if (handle == handle_bad_irq) {
-		if (desc->chip != &no_irq_chip) {
-			desc->chip->mask(irq);
-			desc->chip->ack(irq);
-		}
+		if (desc->chip != &no_irq_chip)
+			desc->chip->shutdown(irq);
 		desc->status |= IRQ_DISABLED;
 		desc->depth = 1;
 	}
@@ -495,7 +493,7 @@ __set_irq_handler(unsigned int irq,
 		desc->status &= ~IRQ_DISABLED;
 		desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE;
 		desc->depth = 0;
-		desc->chip->unmask(irq);
+		desc->chip->startup(irq);
 	}
 	spin_unlock_irqrestore(&desc->lock, flags);
 }
-
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