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 Fix assertion of upper limit of slot index.
details: https://anonhg.NetBSD.org/src/rev/e140a69bfbf8
branches: nick-nhusb
changeset: 804625:e140a69bfbf8
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Apr 10 15:48:34 2016 +0000
description:
Fix assertion of upper limit of slot index.
>From Takahiro HAYASHI
diffstat:
sys/dev/usb/xhci.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 1b2784002b14 -r e140a69bfbf8 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c Sun Apr 10 15:47:58 2016 +0000
+++ b/sys/dev/usb/xhci.c Sun Apr 10 15:48:34 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xhci.c,v 1.28.2.58 2016/04/10 15:47:58 skrll Exp $ */
+/* $NetBSD: xhci.c,v 1.28.2.59 2016/04/10 15:48:34 skrll Exp $ */
/*
* Copyright (c) 2013 Jonathan A. Kollasch
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.58 2016/04/10 15:47:58 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.59 2016/04/10 15:48:34 skrll Exp $");
#include "opt_usb.h"
@@ -1792,7 +1792,7 @@
xr = &xs->xs_ep[dci].xe_tr;
/* sanity check */
- KASSERTMSG(xs->xs_idx != 0 && xs->xs_idx < sc->sc_maxslots,
+ KASSERTMSG(xs->xs_idx != 0 && xs->xs_idx <= sc->sc_maxslots,
"invalid xs_idx %u slot %u", xs->xs_idx, slot);
if ((trb_3 & XHCI_TRB_3_ED_BIT) == 0) {
Home |
Main Index |
Thread Index |
Old Index