From: Dan Carpenter Date: Fri, 16 Aug 2013 07:16:59 +0000 (+0300) Subject: USB: mos7720: use GFP_ATOMIC under spinlock X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d0bd9a41186e076ea543c397ad8a67a6cf604b55;p=linux-beck.git USB: mos7720: use GFP_ATOMIC under spinlock The write_parport_reg_nonblock() function shouldn't sleep because it's called with spinlocks held. Signed-off-by: Dan Carpenter Cc: stable@vger.kernel.org Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index b01300164fc0..248fda6d06f8 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);