]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
USB: yurex: fix control-URB timeout handling
authorJohan Hovold <johan@kernel.org>
Mon, 14 Dec 2020 10:30:53 +0000 (11:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jan 2021 19:10:22 +0000 (20:10 +0100)
commit7a7a734d69f9da99ffe343bbc96ee56986c249ec
tree8c0beecde1f77c39765e792ed8254f97f9d47734
parentb93168915e1de42a160724ca3915e435c91be87c
USB: yurex: fix control-URB timeout handling

commit 372c93131998c0622304bed118322d2a04489e63 upstream.

Make sure to always cancel the control URB in write() so that it can be
reused after a timeout or spurious CMD_ACK.

Currently any further write requests after a timeout would fail after
triggering a WARN() in usb_submit_urb() when attempting to submit the
already active URB.

Reported-by: syzbot+e87ebe0f7913f71f2ea5@syzkaller.appspotmail.com
Fixes: 6bc235a2e24a ("USB: add driver for Meywa-Denki & Kayac YUREX")
Cc: stable <stable@vger.kernel.org> # 2.6.37
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/yurex.c