[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1906481.9XLFQBE7QO@avalon>
Date: Thu, 22 Nov 2012 13:38:20 +0100
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: balbi@...com
Cc: walter harms <wharms@....de>, Cyril Roelandt <tipecaml@...il.com>,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
gregkh@...uxfoundation.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] UVC: use GFP_ATOMIC under spin lock.
On Thursday 22 November 2012 14:22:23 Felipe Balbi wrote:
> On Thu, Nov 22, 2012 at 09:09:57AM +0100, walter harms wrote:
> > Am 19.11.2012 22:34, schrieb Cyril Roelandt:
> > > Found using the following semantic patch:
> > > <spml>
> > > @@
> > > @@
> > > spin_lock_irqsave(...);
> > > ... when != spin_unlock_irqrestore(...);
> > > * GFP_KERNEL
> > > </spml>
> > >
> > > Signed-off-by: Cyril Roelandt <tipecaml@...il.com>
> > > ---
> > >
> > > drivers/usb/gadget/uvc_video.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/usb/gadget/uvc_video.c
> > > b/drivers/usb/gadget/uvc_video.c index b0e53a8..79b4132 100644
> > > --- a/drivers/usb/gadget/uvc_video.c
> > > +++ b/drivers/usb/gadget/uvc_video.c
> > > @@ -309,7 +309,7 @@ uvc_video_pump(struct uvc_video *video)
> > >
> > > video->encode(req, video, buf);
> > >
> > > /* Queue the USB request */
> > >
> > > - if ((ret = usb_ep_queue(video->ep, req, GFP_KERNEL)) < 0) {
> > > + if ((ret = usb_ep_queue(video->ep, req, GFP_ATOMIC)) < 0) {
> > >
> > > printk(KERN_INFO "Failed to queue request (%d)\n", ret);
> > > usb_ep_set_halt(video->ep);
> > > spin_unlock_irqrestore(&video->queue.irqlock, flags);
> >
> > IMHO, this should be two lines, aka:
> >
> > ret = usb_ep_queue(video->ep, req, GFP_KERNEL);
> > if (ret<0)
>
> correct, please resend with the fix.
I agree as well.
--
Regards,
Laurent Pinchart
Download attachment "signature.asc" of type "application/pgp-signature" (491 bytes)
Powered by blists - more mailing lists