[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200131133907.GG11068@kadam>
Date: Fri, 31 Jan 2020 16:39:07 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Johan Hovold <johan@...nel.org>
Cc: gregkh@...uxfoundation.org, Alan Stern <stern@...land.harvard.edu>,
syzbot <syzbot+1bc2c2afd44f820a669f@...kaller.appspotmail.com>,
andreyknvl@...gle.com, ingrassia@...genesys.com,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH] usb: core: urb: change a dev_WARN() to dev_err() for
syzbot
On Fri, Jan 31, 2020 at 02:30:04PM +0100, Johan Hovold wrote:
> > Reported-by: syzbot+1bc2c2afd44f820a669f@...kaller.appspotmail.com
> > Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> > ---
> >
> > drivers/usb/core/urb.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
> > index da923ec17612..0980c1d2253d 100644
> > --- a/drivers/usb/core/urb.c
> > +++ b/drivers/usb/core/urb.c
> > @@ -475,7 +475,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
> >
> > /* Check that the pipe's type matches the endpoint's type */
> > if (usb_urb_ep_type_check(urb))
> > - dev_WARN(&dev->dev, "BOGUS urb xfer, pipe %x != type %x\n",
> > + dev_err(&dev->dev, "BOGUS urb xfer, pipe %x != type %x\n",
> > usb_pipetype(urb->pipe), pipetypes[xfertype]);
> >
> > /* Check against a simple/standard policy */
>
> It seems this change would just be papering over these driver bugs. The
> dev_WARN() is there in the first place to allow us to catch them.
>
> Even if it takes some work, it should be doable to track down and add
> the missing sanity checks to the drivers that lack them. Some have
> already been fixed, and I have some more pending patches to fix or add
> helpers to simplify fixing the remaining ones.
Ah, fine. I misunderstood what the warning message was about.
regards,
dan carpenter
Powered by blists - more mailing lists