Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Apr 2021 10:04:55 +0000
From:      bugzilla-noreply@freebsd.org
To:        usb@FreeBSD.org
Subject:   [Bug 254974] Corsair K95 RGB PLATINUM gaming keyboard not working
Message-ID:  <bug-254974-19105-FKAmEd6zQu@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-254974-19105@https.bugs.freebsd.org/bugzilla/>
References:  <bug-254974-19105@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D254974

--- Comment #19 from Hans Petter Selasky <hselasky@FreeBSD.org> ---
wulf@:

# kgdb101 /boot/kernel/usbhid.ko=20
Reading symbols from /boot/kernel/usbhid.ko...
Reading symbols from /usr/lib/debug//boot/kernel/usbhid.ko.debug...
(kgdb) info line *(usbhid_intr_setup+0x168)
Line 349 of "/usr/src/sys/dev/usb/input/usbhid.c"
   starts at address 0x4e5 <usbhid_intr_setup+357>
   and ends at 0x4e9 <usbhid_intr_setup+361>.

         */
        for (n =3D 0; n !=3D USBHID_N_TRANSFER; n++) {
                if (nowrite && n =3D=3D USBHID_INTR_OUT_DT)
                        continue;
                error =3D usbd_transfer_setup(sc->sc_udev, &sc->sc_iface_in=
dex,
                    sc->sc_xfer + n, sc->sc_config + n, 1,
                    (void *)(sc->sc_xfer_ctx + n), &sc->sc_mtx);
                if (error)
                        break;
        }

        if (error)
                DPRINTF("error=3D%s\n", usbd_errstr(error));

Missing NULL pointer check for sc_xfer[] if usbd_transfer_setup() fails!

        rdesc->rdsize =3D usbd_xfer_max_len(sc->sc_xfer[USBHID_INTR_IN_DT]);
        rdesc->grsize =3D usbd_xfer_max_len(sc->sc_xfer[USBHID_CTRL_DT]);
        rdesc->srsize =3D rdesc->grsize;
        rdesc->wrsize =3D nowrite ? rdesc->srsize :
            usbd_xfer_max_len(sc->sc_xfer[USBHID_INTR_OUT_DT]);

        sc->sc_intr_buf =3D malloc(rdesc->rdsize, M_USBDEV, M_ZERO | M_WAIT=
OK);

--HPS

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-254974-19105-FKAmEd6zQu>