summaryrefslogtreecommitdiff
path: root/sys/arch/i386/isa
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-10-25 16:55:54 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-10-25 16:55:54 +0000
commit5d6c15ef4e2bbfec556cf7537790f524f02dcea3 (patch)
tree7a532c45d995d84c6276f2f095b1c12c4878f2ab /sys/arch/i386/isa
parentf9328b27506c22b0dfe56a69cc115cf6850b8720 (diff)
Wrap PCVT mouse operations in spltty(); deraadt@ ok
Diffstat (limited to 'sys/arch/i386/isa')
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_mouse.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/arch/i386/isa/pcvt/pcvt_mouse.c b/sys/arch/i386/isa/pcvt/pcvt_mouse.c
index 0785e10b5a7..887c2cda833 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_mouse.c
+++ b/sys/arch/i386/isa/pcvt/pcvt_mouse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_mouse.c,v 1.5 2000/10/07 03:12:47 aaron Exp $ */
+/* $OpenBSD: pcvt_mouse.c,v 1.6 2000/10/25 16:55:53 aaron Exp $ */
/*
* Copyright (c) 2000 Jean-Baptiste Marchand, Julien Montagne and Jerome Verdon
@@ -83,7 +83,7 @@ void mouse_button(int button, int clicks);
int
mouse_ioctl(Dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
{
- int device = minor(dev);
+ int device = minor(dev), s;
mouse_info_t mouse_infos = *(mouse_info_t *) data;
unsigned char c;
video_state *cs;
@@ -91,6 +91,8 @@ mouse_ioctl(Dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
if (Copybuffer == NULL)
return (-1);
+ s = spltty();
+
if (device == PCVTCTL_MINOR && cmd == PCVT_MOUSECTL) {
switch (mouse_infos.operation) {
case MOUSE_INIT:
@@ -121,8 +123,9 @@ mouse_ioctl(Dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
break;
default:
- return 0;
+ break;
}
+ splx(s);
return 0;
}
if (device == PCVTCTL_MINOR && cmd == PCVT_MOUSED) {
@@ -135,11 +138,13 @@ mouse_ioctl(Dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
moused_proc = NULL;
break;
default:
- return 0;
+ break;
}
+ splx(s);
return 0;
}
+ splx(s);
return (-1); /* continue treatment in pcioctl */
}