public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] USB: mos7720: use GFP_ATOMIC under spinlock
@ 2013-08-16  7:16 Dan Carpenter
  2013-08-16 10:12 ` Johan Hovold
  2013-08-16 12:44 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2013-08-16  7:16 UTC (permalink / raw)
  To: kernel-janitors

The write_parport_reg_nonblock() function shouldn't sleep because it's
called with spinlocks held.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---

diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index b013001..248fda6 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -374,7 +374,7 @@ static int write_parport_reg_nonblock(struct mos7715_parport *mos_parport,
 		kfree(urbtrack);
 		return -ENOMEM;
 	}
-	urbtrack->setup = kmalloc(sizeof(*urbtrack->setup), GFP_KERNEL);
+	urbtrack->setup = kmalloc(sizeof(*urbtrack->setup), GFP_ATOMIC);
 	if (!urbtrack->setup) {
 		usb_free_urb(urbtrack->urb);
 		kfree(urbtrack);

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

end of thread, other threads:[~2013-08-16 12:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-16  7:16 [patch] USB: mos7720: use GFP_ATOMIC under spinlock Dan Carpenter
2013-08-16 10:12 ` Johan Hovold
2013-08-16 12:44 ` Greg Kroah-Hartman

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