[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20191022153127.22295-1-johan@kernel.org>
Date: Tue, 22 Oct 2019 17:31:27 +0200
From: Johan Hovold <johan@...nel.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Johan Hovold <johan@...nel.org>,
stable <stable@...r.kernel.org>,
syzbot+a4fbb3bb76cda0ea4e58@...kaller.appspotmail.com
Subject: [PATCH] USB: ldusb: fix control-message timeout
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@...r.kernel.org> # 2.6.13
Reported-by: syzbot+a4fbb3bb76cda0ea4e58@...kaller.appspotmail.com
Signed-off-by: Johan Hovold <johan@...nel.org>
---
drivers/usb/misc/ldusb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c
index dd1ea25e42b1..8f86b4ebca89 100644
--- a/drivers/usb/misc/ldusb.c
+++ b/drivers/usb/misc/ldusb.c
@@ -581,7 +581,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",
--
2.23.0
Powered by blists - more mailing lists