patch-pre2.0.3 linux/drivers/char/vt.c

Next file: linux/drivers/isdn/isdn_tty.c
Previous file: linux/drivers/char/softdog.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.2/linux/drivers/char/vt.c linux/drivers/char/vt.c
@@ -236,6 +236,7 @@
 		 * If the time is zero, turn off sound ourselves.
 		 */
 		ticks = HZ * ((arg >> 16) & 0xffff) / 1000;
+		if ((arg & 0xffff) == 0 ) arg |= 1; /* jp: huh? */
 		count = ticks ? (1193180 / (arg & 0xffff)) : 0;
 		kd_mksound(count, ticks);
 		return 0;
@@ -700,7 +701,7 @@
 
 		if (!perm)
 			return -EPERM;
-		i = verify_area(VERIFY_WRITE, (void *)vtmode, sizeof(struct vt_mode));
+		i = verify_area(VERIFY_READ, (void *)vtmode, sizeof(struct vt_mode));
 		if (i)
 			return i;
 		mode = get_user(&vtmode->mode);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this