From: Dave Penkler <dpenkler@gmail.com>
To: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org
Cc: guido.kiener@rohde-schwarz.com, stable@vger.kernel.org,
Dave Penkler <dpenkler@gmail.com>
Subject: [PATCH 0/3 V3] usb: usbtmc: Fix erroneous ioctl returns
Date: Fri, 2 May 2025 09:09:38 +0200 [thread overview]
Message-ID: <20250502070941.31819-1-dpenkler@gmail.com> (raw)
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
next reply other threads:[~2025-05-02 7:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-02 7:09 Dave Penkler [this message]
2025-05-02 7:09 ` [PATCH 1/3 V3] usb: usbtmc: Fix erroneous get_stb ioctl error returns Dave Penkler
2025-05-02 7:09 ` [PATCH 2/3 V3] usb: usbtmc: Fix erroneous wait_srq ioctl return Dave Penkler
2025-05-02 7:09 ` [PATCH 3/3 V3] usb: usbtmc: Fix erroneous generic_read " Dave Penkler
-- strict thread matches above, loose matches on Subject: below --
2025-04-27 7:47 [PATCH 0/3 V3] usb: usbtmc: Fix erroneous ioctl returns Dave Penkler
2025-05-01 15:26 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250502070941.31819-1-dpenkler@gmail.com \
--to=dpenkler@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=guido.kiener@rohde-schwarz.com \
--cc=linux-usb@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).