usb: usbtmc: Fix erroneous ioctl returns
Subsystems (2)
v3 cover 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
Greg KH
maintainerQuoted 19 lines · Dave Penkler
Recent tests with timeouts >
INT_MAXproduced random error returns withusbtmc_get_stb. This was caused by assigning the return value ofwait_event_interruptible_timeoutto 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_timeoutwas assigned to an int and the case of the remaining jiffies return inusbtmc_get_stb.Patch 1: Fixes
usbtmc_get_stb
Patch 2: Fixesusbtmc488_ioctl_wait_srq
Patch 3: Fixesusbtmc_generic_readDave Penkler (3):
usb: usbtmc: Fix erroneousget_stbioctl error returns
usb: usbtmc: Fix erroneouswait_srqioctl return
usb: usbtmc: Fix erroneousgeneric_readioctl return
Quoted 9 lines
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
I'm confused, I don't see a full v3 set of patches here. Look at what ended up on the list:
https://lore.kernel.org/all/[email protected]/
That's just the cover letter?
Can you try again? Something seems to have gotten lost.
thanks,
greg k-h