Source-Changes-HG archive

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

[src-draft/trunk]: src/sys/dev/usb Hold lock while scheduling transfer.



details:   https://anonhg.NetBSD.org/src-all/rev/a86ef2d0898d
branches:  trunk
changeset: 361081:a86ef2d0898d
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Mon Jan 03 04:07:04 2022 +1100

description:
Hold lock while scheduling transfer.

diffstat:

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

diffs (18 lines):

diff -r c02a9317ce6e -r a86ef2d0898d sys/dev/usb/usbwifi.c
--- a/sys/dev/usb/usbwifi.c     Sun Jan 02 12:11:26 2022 +1100
+++ b/sys/dev/usb/usbwifi.c     Mon Jan 03 04:07:04 2022 +1100
@@ -324,12 +324,12 @@
        if (uwp->uwp_dying || uwp->uwp_stopping)
                goto out;
 
-       mutex_exit(&uwp->uwp_rxlock);
-
        /* Setup new transfer. */
        usbd_setup_xfer(xfer, c, c->uwc_buf, uw->uw_rx_bufsz,
            uw->uw_rx_xfer_flags, uw->uw_rx_xfer_timeout, usbwifi_rxeof);
        usbd_transfer(xfer);
+       mutex_exit(&uwp->uwp_rxlock);
+
        return;
 
 out:



Home | Main Index | Thread Index | Old Index