* [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* Re: [patch] USB: mos7720: use GFP_ATOMIC under spinlock
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
1 sibling, 0 replies; 3+ messages in thread
From: Johan Hovold @ 2013-08-16 10:12 UTC (permalink / raw)
To: kernel-janitors
On Fri, Aug 16, 2013 at 10:16:59AM +0300, Dan Carpenter wrote:
> The write_parport_reg_nonblock() function shouldn't sleep because it's
> called with spinlocks held.
Ouch. Thanks for catching this.
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@vger.kernel.org
Acked-by: Johan Hovold <jhovold@gmail.com>
Greg, this one is needed in 3.11 (with a stable tag) as the offending
commit ef6c8c1d ("USB: mos7720: fix broken control requests") is in
usb-3.11-rc6.
Thanks,
Johan
> ---
>
> 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 [flat|nested] 3+ messages in thread* Re: [patch] USB: mos7720: use GFP_ATOMIC under spinlock
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
1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2013-08-16 12:44 UTC (permalink / raw)
To: kernel-janitors
On Fri, Aug 16, 2013 at 12:12:10PM +0200, Johan Hovold wrote:
> On Fri, Aug 16, 2013 at 10:16:59AM +0300, Dan Carpenter wrote:
> > The write_parport_reg_nonblock() function shouldn't sleep because it's
> > called with spinlocks held.
>
> Ouch. Thanks for catching this.
>
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> Cc: stable@vger.kernel.org
> Acked-by: Johan Hovold <jhovold@gmail.com>
>
> Greg, this one is needed in 3.11 (with a stable tag) as the offending
> commit ef6c8c1d ("USB: mos7720: fix broken control requests") is in
> usb-3.11-rc6.
Ok, I'll mark it as such, thanks.
greg k-h
^ permalink raw reply [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