public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: gr_udc: unconditionally use GFP_ATOMIC in gr_queue_ext()
@ 2014-05-07 20:26 Alexey Khoroshilov
  2014-05-08 13:01 ` Andreas Larsson
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Khoroshilov @ 2014-05-07 20:26 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Alexey Khoroshilov, Andreas Larsson, Greg Kroah-Hartman,
	linux-usb, linux-kernel, ldv-project

As far as gr_queue() is called with spinlock held,
we have to pass GFP_ATOMIC regardless of gfp argument.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
 drivers/usb/gadget/gr_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb/gadget/gr_udc.c
index f984ee75324d..19a1b52c4210 100644
--- a/drivers/usb/gadget/gr_udc.c
+++ b/drivers/usb/gadget/gr_udc.c
@@ -1679,7 +1679,7 @@ static int gr_queue_ext(struct usb_ep *_ep, struct usb_request *_req,
 	if (ep->is_in)
 		gr_dbgprint_request("EXTERN", ep, req);
 
-	ret = gr_queue(ep, req, gfp_flags);
+	ret = gr_queue(ep, req, GFP_ATOMIC);
 
 	spin_unlock(&ep->dev->lock);
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: gadget: gr_udc: unconditionally use GFP_ATOMIC in gr_queue_ext()
  2014-05-07 20:26 [PATCH] usb: gadget: gr_udc: unconditionally use GFP_ATOMIC in gr_queue_ext() Alexey Khoroshilov
@ 2014-05-08 13:01 ` Andreas Larsson
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Larsson @ 2014-05-08 13:01 UTC (permalink / raw)
  To: Alexey Khoroshilov, Felipe Balbi
  Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, ldv-project

On 2014-05-07 22:26, Alexey Khoroshilov wrote:
> As far as gr_queue() is called with spinlock held,
> we have to pass GFP_ATOMIC regardless of gfp argument.
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>

Acked-by: Andreas Larsson <andreas@gaisler.com>

> ---
>   drivers/usb/gadget/gr_udc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb/gadget/gr_udc.c
> index f984ee75324d..19a1b52c4210 100644
> --- a/drivers/usb/gadget/gr_udc.c
> +++ b/drivers/usb/gadget/gr_udc.c
> @@ -1679,7 +1679,7 @@ static int gr_queue_ext(struct usb_ep *_ep, struct usb_request *_req,
>   	if (ep->is_in)
>   		gr_dbgprint_request("EXTERN", ep, req);
>
> -	ret = gr_queue(ep, req, gfp_flags);
> +	ret = gr_queue(ep, req, GFP_ATOMIC);
>
>   	spin_unlock(&ep->dev->lock);
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-08 13:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-07 20:26 [PATCH] usb: gadget: gr_udc: unconditionally use GFP_ATOMIC in gr_queue_ext() Alexey Khoroshilov
2014-05-08 13:01 ` Andreas Larsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox