usb: usbtmc: Fix erroneous ioctl returns
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest posting 2/23 patches 0 repliesNew
- v3 posting 1/21 of 3 patches 1 replySuperseded
- v2 posting 2/22 of 3 patches 0 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 posting 1/2 | 1 of 3 patches | 0 replies | Superseded | |
| v1 | 3 patches | 1 reply | Superseded |
Patches in v3 posting 2/2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | usb: usbtmc: Fix erroneous get_stb ioctl error returnsdrivers/ | +8 | 0 replies | |
| 2/3 | usb: usbtmc: Fix erroneous wait_srq ioctl returndrivers/ | +11 | 0 replies | |
| 3/3 | usb: usbtmc: Fix erroneous generic_read ioctl returndrivers/ | +12 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH 0/3 V3] usb: usbtmc: Fix erroneous ioctl returns
Recent tests with timeouts > INT_MAX produced random error returns with usbtmc_get_stb. This was caused by assigning the return value of wait_event_interruptible_timeout to an int which overflowed to negative values. Also return value on success was the remaining number of jiffies instead of 0.
These patches fix all the cases where the return of wait_event_interruptible_timeout was assigned to an int and the case of the remaining jiffies return in usbtmc_get_stb.
Patch 1: Fixes usbtmc_get_stb
Patch 2: Fixes usbtmc488_ioctl_wait_srq
Patch 3: Fixes usbtmc_generic_read
Dave Penkler (3):
usb: usbtmc: Fix erroneous get_stb ioctl error returns
usb: usbtmc: Fix erroneous wait_srq ioctl return
usb: usbtmc: Fix erroneous generic_read ioctl return
drivers/usb/class/usbtmc.c | 53 ++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 22 deletions(-)
--
Changes V1 => V2 Add cc to stable line
V2 => V3 Add susbsystem to cover letter
2.49.0