Lock softc before clearing bits.
Found by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 1 week
This commit is contained in:
parent
276df218b9
commit
996f8471b1
@ -518,7 +518,9 @@ uhid_open(struct usb_fifo *fifo, int fflags)
|
|||||||
*/
|
*/
|
||||||
if (fflags & FREAD) {
|
if (fflags & FREAD) {
|
||||||
/* reset flags */
|
/* reset flags */
|
||||||
|
mtx_lock(&sc->sc_mtx);
|
||||||
sc->sc_flags &= ~UHID_FLAG_IMMED;
|
sc->sc_flags &= ~UHID_FLAG_IMMED;
|
||||||
|
mtx_unlock(&sc->sc_mtx);
|
||||||
|
|
||||||
if (usb_fifo_alloc_buffer(fifo,
|
if (usb_fifo_alloc_buffer(fifo,
|
||||||
sc->sc_isize + 1, UHID_FRAME_NUM)) {
|
sc->sc_isize + 1, UHID_FRAME_NUM)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user