Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/dev/usb Pull up following revision(s) (requested by r...



details:   https://anonhg.NetBSD.org/src/rev/ece88ecd99fe
branches:  netbsd-9
changeset: 368781:ece88ecd99fe
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Aug 03 16:21:55 2022 +0000

description:
Pull up following revision(s) (requested by riastradh in ticket #1493):

        sys/dev/usb/ucom.c: revision 1.129

ucom(4): Fix earlier mistake causing pipes not to be closed.

In revision 1.123, mrg@ changed what he thought was a double-close,
but was actually abort&close (as is appropriate) to just abort (which
is not enough -- leaks the pipe).  This restores the abort&close.

The original `bug' was found by code inspection, whereas this bug was
found by asserting in usb_subr.c that no pipes are open on device
disconnection after detach; the asserts actually triggered with
several ucom(4) devices, and no longer trigger with this change.

XXX pullup-9

diffstat:

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

diffs (30 lines):

diff -r 822b99afe747 -r ece88ecd99fe sys/dev/usb/ucom.c
--- a/sys/dev/usb/ucom.c        Wed Aug 03 16:02:25 2022 +0000
+++ b/sys/dev/usb/ucom.c        Wed Aug 03 16:21:55 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ucom.c,v 1.125.2.1 2020/12/12 12:56:40 martin Exp $    */
+/*     $NetBSD: ucom.c,v 1.125.2.2 2022/08/03 16:21:55 martin Exp $    */
 
 /*
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.125.2.1 2020/12/12 12:56:40 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.125.2.2 2022/08/03 16:21:55 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -414,11 +414,9 @@
 
        if (sc->sc_bulkin_pipe != NULL) {
                usbd_abort_pipe(sc->sc_bulkin_pipe);
-               sc->sc_bulkin_pipe = NULL;
        }
        if (sc->sc_bulkout_pipe != NULL) {
                usbd_abort_pipe(sc->sc_bulkout_pipe);
-               sc->sc_bulkout_pipe = NULL;
        }
 
        mutex_enter(&sc->sc_lock);



Home | Main Index | Thread Index | Old Index