Commit 4e77d3e
usb: usbtmc: Fix erroneous generic_read ioctl return
wait_event_interruptible_timeout returns a long
The return value was being assigned to an int causing an integer overflow
when the remaining jiffies > INT_MAX which resulted in random error
returns.
Use a long return value, converting to the int ioctl return only on error.
Fixes: bb99794 ("usb: usbtmc: Add ioctl for vendor specific read")
Cc: [email protected]
Signed-off-by: Dave Penkler <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent a9747c9 commit 4e77d3e
1 file changed
+12
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
| 836 | + | |
836 | 837 | | |
837 | 838 | | |
838 | 839 | | |
| |||
945 | 946 | | |
946 | 947 | | |
947 | 948 | | |
948 | | - | |
| 949 | + | |
949 | 950 | | |
950 | 951 | | |
951 | 952 | | |
952 | 953 | | |
953 | | - | |
954 | | - | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
955 | 961 | | |
956 | | - | |
957 | | - | |
958 | | - | |
| 962 | + | |
| 963 | + | |
959 | 964 | | |
960 | 965 | | |
| 966 | + | |
961 | 967 | | |
962 | 968 | | |
963 | 969 | | |
| |||
0 commit comments