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:	Wed, 30 Jan 2008 00:44:34 +0100
From:	Jan Kiszka <jan.kiszka@....de>
To:	Jason Wessel <jason.wessel@...driver.com>
CC:	Ingo Molnar <mingo@...e.hu>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	kgdb-bugreport@...ts.sourceforge.net
Subject: [PATCH 2/5] KGDB-8250: handle shared IRQ properly

Currently, KGDB's 8250 driver always reports IRQs as handled, though it
registers the line with IRQF_SHARED. This patch fixes the behavior by
returning the appropriate values from the interrupt handler.

Signed-off-by: Jan Kiszka <jan.kiszka@....de>

---
 drivers/serial/8250_kgdb.c |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

Index: b/drivers/serial/8250_kgdb.c
===================================================================
--- a/drivers/serial/8250_kgdb.c
+++ b/drivers/serial/8250_kgdb.c
@@ -152,14 +152,15 @@ static int kgdb_get_debug_char(void)
 static irqreturn_t
 kgdb8250_interrupt(int irq, void *dev_id)
 {
-	if (kgdb_ioread(UART_IIR) & UART_IIR_RDI) {
-		/* Throw away the data if another I/O routine is active. */
-		if (kgdb_io_ops.read_char != kgdb_get_debug_char &&
-				(kgdb_ioread(UART_LSR) & UART_LSR_DR))
-			kgdb_ioread(UART_RX);
-		else
-			breakpoint();
-	}
+	if (!(kgdb_ioread(UART_IIR) & UART_IIR_RDI))
+		return IRQ_NONE;
+
+	/* Throw away the data if another I/O routine is active. */
+	if (kgdb_io_ops.read_char != kgdb_get_debug_char &&
+	    (kgdb_ioread(UART_LSR) & UART_LSR_DR))
+		kgdb_ioread(UART_RX);
+	else
+		breakpoint();
 
 	return IRQ_HANDLED;
 }
--
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