Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb usb(9): Assert ud_ifaces is null before we clobb...



details:   https://anonhg.NetBSD.org/src/rev/a10448c02f37
branches:  trunk
changeset: 374212:a10448c02f37
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Apr 11 08:50:07 2023 +0000

description:
usb(9): Assert ud_ifaces is null before we clobber it.

diffstat:

 sys/dev/usb/usb_subr.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 4a515446ffdb -r a10448c02f37 sys/dev/usb/usb_subr.c
--- a/sys/dev/usb/usb_subr.c    Tue Apr 11 08:40:19 2023 +0000
+++ b/sys/dev/usb/usb_subr.c    Tue Apr 11 08:50:07 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb_subr.c,v 1.277 2022/04/06 22:01:45 mlelstv Exp $   */
+/*     $NetBSD: usb_subr.c,v 1.278 2023/04/11 08:50:07 riastradh Exp $ */
 /*     $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $   */
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.277 2022/04/06 22:01:45 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.278 2023/04/11 08:50:07 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -867,6 +867,8 @@ usbd_set_config_index(struct usbd_device
                goto bad;
        }
 
+       KASSERTMSG(dev->ud_ifaces == NULL, "ud_ifaces=%p", dev->ud_ifaces);
+
        /* Allocate and fill interface data. */
        nifc = cdp->bNumInterface;
        if (nifc == 0) {



Home | Main Index | Thread Index | Old Index