Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb In usbd_transfer(), abort the xfer if it is inte...
details: https://anonhg.NetBSD.org/src/rev/9587beaa0741
branches: trunk
changeset: 787900:9587beaa0741
user: aymeric <aymeric%NetBSD.org@localhost>
date: Thu Jul 11 19:46:44 2013 +0000
description:
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:
sys/dev/usb/usbdi.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 2fd658fb5d64 -r 9587beaa0741 sys/dev/usb/usbdi.c
--- a/sys/dev/usb/usbdi.c Thu Jul 11 19:41:19 2013 +0000
+++ b/sys/dev/usb/usbdi.c Thu Jul 11 19:46:44 2013 +0000
@@ -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 @@
else
err = tsleep(xfer, PRIBIO, "usbsyn", 0);
}
- if (err)
+ if (err) {
+ pipe->methods->abort(xfer);
break;
+ }
}
usbd_unlock_pipe(pipe);
return (xfer->status);
Home |
Main Index |
Thread Index |
Old Index