patch-2.4.20 linux-2.4.20/drivers/char/i810-tco.c

Next file: linux-2.4.20/drivers/char/i8k.c
Previous file: linux-2.4.20/drivers/char/hvc_console.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/drivers/char/i810-tco.c linux-2.4.20/drivers/char/i810-tco.c
@@ -223,7 +223,10 @@
 
 		/* scan to see wether or not we got the magic character */
 		for (i = 0; i != len; i++) {
-			if (data[i] == 'V')
+			u8 c;
+			if(get_user(c, data+i))
+				return -EFAULT;
+			if (c == 'V')
 				tco_expect_close = 42;
 		}
 
@@ -241,7 +244,9 @@
 	int options, retval = -EINVAL;
 
 	static struct watchdog_info ident = {
-		options:		WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
+		options:		WDIOF_SETTIMEOUT |
+					WDIOF_KEEPALIVEPING |
+					WDIOF_MAGICCLOSE,
 		firmware_version:	0,
 		identity:		"i810 TCO timer",
 	};

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)