Patch kdb v1.5 for NMI oops in kdb_read

Keith Owens kaos at melbourne.sgi.com
Tue Oct 3 06:50:13 PDT 2000


This fixes the NMI oops in the bta command.  It also exports kdb_read
for module use (untested).

Index: 0-test9-pre9.2/kdb/kdb_io.c
--- 0-test9-pre9.2/kdb/kdb_io.c Mon, 02 Oct 2000 20:59:05 +1100 kaos (linux-2.4/Q/c/32_kdb_io.c 1.6 644)
+++ 0-test9-pre9.2(w)/kdb/kdb_io.c Wed, 04 Oct 2000 00:28:11 +1100 kaos (linux-2.4/Q/c/32_kdb_io.c 1.6 644)
@@ -33,6 +33,8 @@
  *		KDB v1.2
  */
 
+#include <linux/config.h>
+#include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
@@ -93,7 +95,14 @@ static struct console *kdbcons;
 char *
 kdb_read(char *buffer, size_t bufsize)
 {
-	return kdba_read(buffer, bufsize);
+	int no_watchdog;
+	char *ret;
+	no_watchdog = KDB_STATE(NO_WATCHDOG);
+	KDB_STATE_SET(NO_WATCHDOG);
+	ret = kdba_read(buffer, bufsize);
+	if (!no_watchdog)
+		KDB_STATE_CLEAR(NO_WATCHDOG);
+	return(ret);
 }
 
 /*
@@ -299,3 +308,5 @@ kdb_io_init(void)
 	}
 	return;
 }
+
+EXPORT_SYMBOL(kdb_read);
Index: 0-test9-pre9.2/kdb/Makefile
--- 0-test9-pre9.2/kdb/Makefile Sun, 24 Sep 2000 22:16:07 +1100 kaos (linux-2.4/Q/c/36_Makefile 1.5 644)
+++ 0-test9-pre9.2(w)/kdb/Makefile Tue, 03 Oct 2000 23:06:38 +1100 kaos (linux-2.4/Q/c/36_Makefile 1.5 644)
@@ -1,6 +1,6 @@
 O_TARGET := kdb.o
-O_OBJS    = kdb_bt.o kdb_bp.o kdb_id.o kdb_io.o kdbsupport.o gen-kdb_cmds.o
-OX_OBJS   = kdbmain.o
+O_OBJS    = kdb_bt.o kdb_bp.o kdb_id.o kdbsupport.o gen-kdb_cmds.o
+OX_OBJS   = kdbmain.o kdb_io.o
 
 MOD_SUB_DIRS += modules
 




More information about the kdb mailing list