diff options
author | Johan Hovold <johan@kernel.org> | 2019-10-22 17:31:27 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-06 12:43:30 +0100 |
commit | 0675c81abe0424be839cbc64a4dd233de8297170 (patch) | |
tree | 6a6bf35bc0dccb9b9ba0239aee503c2abe191919 /drivers | |
parent | 739ad3b6e596cd87e212df5998e3ea86baf0e496 (diff) | |
download | linux-stable-0675c81abe0424be839cbc64a4dd233de8297170.tar.gz linux-stable-0675c81abe0424be839cbc64a4dd233de8297170.tar.bz2 linux-stable-0675c81abe0424be839cbc64a4dd233de8297170.zip |
USB: ldusb: fix control-message timeout
commit 52403cfbc635d28195167618690595013776ebde upstream.
USB control-message timeouts are specified in milliseconds, not jiffies.
Waiting 83 minutes for a transfer to complete is a bit excessive.
Fixes: 2824bd250f0b ("[PATCH] USB: add ldusb driver")
Cc: stable <stable@vger.kernel.org> # 2.6.13
Reported-by: syzbot+a4fbb3bb76cda0ea4e58@syzkaller.appspotmail.com
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20191022153127.22295-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/misc/ldusb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c index 457fc0ae70e1..6387545b17ea 100644 --- a/drivers/usb/misc/ldusb.c +++ b/drivers/usb/misc/ldusb.c @@ -583,7 +583,7 @@ static ssize_t ld_usb_write(struct file *file, const char __user *buffer, 1 << 8, 0, dev->interrupt_out_buffer, bytes_to_write, - USB_CTRL_SET_TIMEOUT * HZ); + USB_CTRL_SET_TIMEOUT); if (retval < 0) dev_err(&dev->intf->dev, "Couldn't submit HID_REQ_SET_REPORT %d\n", |