Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nick-nhusb]: src/sys/dev/usb Protect read of isoc->next with bus lock
details: https://anonhg.NetBSD.org/src/rev/ea699a1694fb
branches: nick-nhusb
changeset: 334436:ea699a1694fb
user: skrll <skrll%NetBSD.org@localhost>
date: Thu Mar 17 07:59:45 2016 +0000
description:
Protect read of isoc->next with bus lock
diffstat:
sys/dev/usb/uhci.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r e95f94f8d819 -r ea699a1694fb sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c Sun Mar 13 08:09:00 2016 +0000
+++ b/sys/dev/usb/uhci.c Thu Mar 17 07:59:45 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uhci.c,v 1.264.4.66 2016/03/13 08:09:00 skrll Exp $ */
+/* $NetBSD: uhci.c,v 1.264.4.67 2016/03/17 07:59:45 skrll Exp $ */
/*
* Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.66 2016/03/13 08:09:00 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.67 2016/03/17 07:59:45 skrll Exp $");
#include "opt_usb.h"
@@ -3062,6 +3062,7 @@
printf("%s: overflow!\n", __func__);
#endif
+ mutex_enter(&sc->sc_lock);
next = isoc->next;
if (next == -1) {
/* Not in use yet, schedule it a few frames ahead. */
@@ -3078,7 +3079,6 @@
UHCI_TD_ACTIVE |
UHCI_TD_IOS);
nframes = xfer->ux_nframes;
- mutex_enter(&sc->sc_lock);
for (i = 0; i < nframes; i++) {
std = isoc->stds[next];
if (++next >= UHCI_VFRAMELIST_COUNT)
Home |
Main Index |
Thread Index |
Old Index