Linux USB
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Oliver Neukum <oneukum@suse.com>
Cc: gregkh@linuxfoundation.org, jkrshnmenon@gmail.com,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: serial: sierra: deal with insufficiently long notifications
Date: Wed, 15 Jul 2026 14:18:40 +0200	[thread overview]
Message-ID: <ald6oCb3Y2lLvJJ7@hovoldconsulting.com> (raw)
In-Reply-To: <a410147d-29f7-427d-a8cd-bff0397f1988@suse.com>

On Wed, Jul 15, 2026 at 12:05:10PM +0200, Oliver Neukum wrote:
> 
> 
> On 15.07.26 09:22, Johan Hovold wrote:
>   
> >>   	/* Resubmit urb so we continue receiving IRQ data */
> >>   	if (status != -ESHUTDOWN && status != -ENOENT) {
> >> +skip_too_short:
> > 
> > And please move the label before the conditional and rename it after
> 
> That really makes no sense. If we encounter a short packet
> the status must be good. We wouldn't be allowed to look
> at the packet in the first place if that weren't the case.

It makes the code cleaner by not adding labels inside a conditional.

And we don't care about that extra status check in the theoretical case
that a malicious device ever sends a short message.

Johan

      reply	other threads:[~2026-07-15 12:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14 18:33 [PATCH] usb: serial: sierra: deal with insufficiently long notifications Oliver Neukum
2026-07-15  7:22 ` Johan Hovold
2026-07-15 10:05   ` Oliver Neukum
2026-07-15 12:18     ` Johan Hovold [this message]

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=ald6oCb3Y2lLvJJ7@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jkrshnmenon@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.com \
    /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