All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run()
@ 2011-05-30 17:01 ` Alexey Khoroshilov
  0 siblings, 0 replies; 4+ messages in thread
From: Alexey Khoroshilov @ 2011-05-30 17:01 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Alexey Khoroshilov, linux-usb, netdev, linux-kernel

The patch replaces GFP_KERNEL with GFP_ATOMIC.

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

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
 drivers/net/usb/catc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c
index d7221c4..8056f8a 100644
--- a/drivers/net/usb/catc.c
+++ b/drivers/net/usb/catc.c
@@ -495,7 +495,7 @@ static void catc_ctrl_run(struct catc *catc)
 	if (!q->dir && q->buf && q->len)
 		memcpy(catc->ctrl_buf, q->buf, q->len);
 
-	if ((status = usb_submit_urb(catc->ctrl_urb, GFP_KERNEL)))
+	if ((status = usb_submit_urb(catc->ctrl_urb, GFP_ATOMIC)))
 		err("submit(ctrl_urb) status %d", status);
 }
 
-- 
1.7.4.1


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

* [PATCH] drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run()
@ 2011-05-30 17:01 ` Alexey Khoroshilov
  0 siblings, 0 replies; 4+ messages in thread
From: Alexey Khoroshilov @ 2011-05-30 17:01 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Alexey Khoroshilov, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

The patch replaces GFP_KERNEL with GFP_ATOMIC.

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

Signed-off-by: Alexey Khoroshilov <khoroshilov-ufN2psIa012HXe+LvDLADg@public.gmane.org>
---
 drivers/net/usb/catc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c
index d7221c4..8056f8a 100644
--- a/drivers/net/usb/catc.c
+++ b/drivers/net/usb/catc.c
@@ -495,7 +495,7 @@ static void catc_ctrl_run(struct catc *catc)
 	if (!q->dir && q->buf && q->len)
 		memcpy(catc->ctrl_buf, q->buf, q->len);
 
-	if ((status = usb_submit_urb(catc->ctrl_urb, GFP_KERNEL)))
+	if ((status = usb_submit_urb(catc->ctrl_urb, GFP_ATOMIC)))
 		err("submit(ctrl_urb) status %d", status);
 }
 
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run()
  2011-05-30 17:01 ` Alexey Khoroshilov
  (?)
@ 2011-05-30 17:06 ` Alexey Khoroshilov
  2011-05-31 22:30   ` David Miller
  -1 siblings, 1 reply; 4+ messages in thread
From: Alexey Khoroshilov @ 2011-05-30 17:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Alexey Khoroshilov, linux-usb, netdev, linux-kernel

Sorry, I missed a description in the previous mail.


catc_ctrl_run() calls usb_submit_urb() with GFP_KERNEL, while it is called from
catc_ctrl_async() and catc_ctrl_done() with catc->ctrl_lock spinlock held.

The patch replaces GFP_KERNEL with GFP_ATOMIC.

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

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
 drivers/net/usb/catc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c
index d7221c4..8056f8a 100644
--- a/drivers/net/usb/catc.c
+++ b/drivers/net/usb/catc.c
@@ -495,7 +495,7 @@ static void catc_ctrl_run(struct catc *catc)
 	if (!q->dir && q->buf && q->len)
 		memcpy(catc->ctrl_buf, q->buf, q->len);
 
-	if ((status = usb_submit_urb(catc->ctrl_urb, GFP_KERNEL)))
+	if ((status = usb_submit_urb(catc->ctrl_urb, GFP_ATOMIC)))
 		err("submit(ctrl_urb) status %d", status);
 }
 
-- 
1.7.4.1


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

* Re: [PATCH] drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run()
  2011-05-30 17:06 ` Alexey Khoroshilov
@ 2011-05-31 22:30   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2011-05-31 22:30 UTC (permalink / raw)
  To: khoroshilov; +Cc: gregkh, linux-usb, netdev, linux-kernel

From: Alexey Khoroshilov <khoroshilov@ispras.ru>
Date: Mon, 30 May 2011 21:06:24 +0400

> catc_ctrl_run() calls usb_submit_urb() with GFP_KERNEL, while it is called from
> catc_ctrl_async() and catc_ctrl_done() with catc->ctrl_lock spinlock held.
> 
> The patch replaces GFP_KERNEL with GFP_ATOMIC.
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>

Applied.

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

end of thread, other threads:[~2011-05-31 22:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-30 17:01 [PATCH] drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run() Alexey Khoroshilov
2011-05-30 17:01 ` Alexey Khoroshilov
2011-05-30 17:06 ` Alexey Khoroshilov
2011-05-31 22:30   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.