diff options
author | 2017-07-20 16:54:45 +0000 | |
---|---|---|
committer | 2017-07-20 16:54:45 +0000 | |
commit | 5dab5ed08544bc19ae46dfea33afcdbecd2ee794 (patch) | |
tree | 2506611f2dbc91faee4af74a580d8f11d9b2ffb0 | |
parent | Initialize a local variable to not leak kernel stack info to userland (diff) | |
download | wireguard-openbsd-5dab5ed08544bc19ae46dfea33afcdbecd2ee794.tar.xz wireguard-openbsd-5dab5ed08544bc19ae46dfea33afcdbecd2ee794.zip |
Remove SIGIO support. Base tools do not implement it and ports relying
on libusbhid, generally via SDL, shouldn't do it either since it's not
portable.
Suggested by deraadt@ after Ilja van Sprundel reported an issue with a
stale struct proc pointer in similar code.
ok kettenis@, deraadt@
-rw-r--r-- | sys/dev/usb/uhid.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index bd4d9de5ae0..184f30879e9 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhid.c,v 1.67 2017/04/08 02:57:25 deraadt Exp $ */ +/* $OpenBSD: uhid.c,v 1.68 2017/07/20 16:54:45 mpi Exp $ */ /* $NetBSD: uhid.c,v 1.57 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -75,7 +75,6 @@ struct uhid_softc { struct clist sc_q; struct selinfo sc_rsel; - struct process *sc_async; /* process that wants SIGIO */ u_char sc_state; /* driver state */ #define UHID_ASLP 0x01 /* waiting for device data */ @@ -198,10 +197,6 @@ uhid_intr(struct uhidev *addr, void *data, u_int len) wakeup(&sc->sc_q); } selwakeup(&sc->sc_rsel); - if (sc->sc_async != NULL) { - DPRINTFN(3, ("uhid_intr: sending SIGIO %p\n", sc->sc_async)); - prsignal(sc->sc_async, SIGIO); - } } int @@ -228,7 +223,6 @@ uhidopen(dev_t dev, int flag, int mode, struct proc *p) clalloc(&sc->sc_q, UHID_BSIZE, 0); sc->sc_obuf = malloc(sc->sc_hdev.sc_osize, M_USBDEV, M_WAITOK); - sc->sc_async = NULL; return (0); } @@ -244,7 +238,6 @@ uhidclose(dev_t dev, int flag, int mode, struct proc *p) clfree(&sc->sc_q); free(sc->sc_obuf, M_USBDEV, sc->sc_hdev.sc_osize); - sc->sc_async = NULL; uhidev_close(&sc->sc_hdev); return (0); @@ -369,24 +362,6 @@ uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr, /* All handled in the upper FS layer. */ break; - case FIOASYNC: - if (*(int *)addr) { - if (sc->sc_async != NULL) - return (EBUSY); - sc->sc_async = p->p_p; - DPRINTF(("uhid_do_ioctl: FIOASYNC %p\n", p)); - } else - sc->sc_async = NULL; - break; - - /* XXX this is not the most general solution. */ - case TIOCSPGRP: - if (sc->sc_async == NULL) - return (EINVAL); - if (*(int *)addr != sc->sc_async->ps_pgid) - return (EPERM); - break; - case USB_GET_DEVICEINFO: usbd_fill_deviceinfo(sc->sc_hdev.sc_udev, (struct usb_device_info *)addr, 1); |