patch-2.4.20 linux-2.4.20/drivers/char/w83877f_wdt.c

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

diff -urN linux-2.4.19/drivers/char/w83877f_wdt.c linux-2.4.20/drivers/char/w83877f_wdt.c
@@ -192,8 +192,13 @@
 
 		/* now scan */
 		for(ofs = 0; ofs != count; ofs++)
-			if(buf[ofs] == 'V')
+		{
+			char c;
+			if(get_user(c, buf + ofs))
+				return -EFAULT;
+			if(c == 'V')
 				wdt_expect_close = 1;
+		}
 
 		/* someone wrote to us, we should restart timer */
 		next_heartbeat = jiffies + WDT_HEARTBEAT;
@@ -246,7 +251,7 @@
 {
 	static struct watchdog_info ident=
 	{
-		0,
+		WDIOF_MAGICCLOSE,
 		1,
 		"W83877F"
 	};

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