public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <greg@kroah.com>, "Geoffrey D. Bennett" <g@b4.vu>,
	USB mailing list <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] USB: core: WARN if pipe direction != setup packet direction
Date: Sat, 22 May 2021 09:56:43 +0200	[thread overview]
Message-ID: <YKi5O5mDxxo48+Y+@hovoldconsulting.com> (raw)
In-Reply-To: <20210521143823.GB1239965@rowland.harvard.edu>

On Fri, May 21, 2021 at 10:38:23AM -0400, Alan Stern wrote:
> On Fri, May 21, 2021 at 10:03:26AM +0200, Johan Hovold wrote:
> > On Thu, May 20, 2021 at 04:20:56PM -0400, Alan Stern wrote:
> 
> > > +		if (usb_pipeout(urb->pipe) != is_out)
> > > +			dev_WARN(&dev->dev, "BOGUS control dir, pipe %x doesn't match bRequestType %x\n",
> > > +					urb->pipe, setup->bRequestType);
> 
> > While I agree with intention here, I'm worried that this will start
> > flooding the logs of users.
> > 
> > So first, this should probably be rate limited.
> 
> So change it to dev_WARN_ONCE()?  You and Greg think that will be good 
> enough?

I think so, yes. In the unlikely event that there are more than one
driver in use that gets this wrong in a system it'll only take a little
longer to root them all out.

Johan

      reply	other threads:[~2021-05-22  7:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20 20:20 [PATCH] USB: core: WARN if pipe direction != setup packet direction Alan Stern
2021-05-21  8:03 ` Johan Hovold
2021-05-21 12:14   ` Greg KH
2021-05-21 13:17   ` Johan Hovold
2021-05-21 14:41     ` Alan Stern
2021-05-22  2:16     ` [PATCH v2] " Alan Stern
2021-05-22  7:56       ` Johan Hovold
2021-05-24 11:39       ` Johan Hovold
2021-05-24 14:47         ` Alan Stern
2021-05-25 12:40           ` Johan Hovold
2021-05-25 15:12             ` Alan Stern
2021-05-26  7:49               ` Johan Hovold
2021-05-21 14:38   ` [PATCH] " Alan Stern
2021-05-22  7:56     ` 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=YKi5O5mDxxo48+Y+@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=g@b4.vu \
    --cc=greg@kroah.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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