diff options
| author | aymeric <aymeric@NetBSD.org> | 2013-07-11 19:46:44 +0000 |
|---|---|---|
| committer | aymeric <aymeric@NetBSD.org> | 2013-07-11 19:46:44 +0000 |
| commit | bf7b1375b1e69f5a2de9af26eebfe3ac2ebe9d86 (patch) | |
| tree | e408187cf748a2c97a3e3284e403bc536f588e57 /sys/dev/usb | |
| parent | d55d93703bf5a40a4de3bd744847db456d7f8d23 (diff) | |
In usbd_transfer(), abort the xfer if it is interrupted by a signal while in
progress.
This prevents that xfer from being freed while still on queue, and ensuing
panic().
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/usbdi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 4b5d2df9387..3e35ed6fc54 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.c,v 1.153 2013/07/06 14:38:54 jakllsch Exp $ */ +/* $NetBSD: usbdi.c,v 1.154 2013/07/11 19:46:44 aymeric Exp $ */ /* * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.153 2013/07/06 14:38:54 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.154 2013/07/11 19:46:44 aymeric Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -336,8 +336,10 @@ usbd_transfer(usbd_xfer_handle xfer) else err = tsleep(xfer, PRIBIO, "usbsyn", 0); } - if (err) + if (err) { + pipe->methods->abort(xfer); break; + } } usbd_unlock_pipe(pipe); return (xfer->status); |
