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.carpen...@oracle.com>

Cc: sta...@vger.kernel.org
Acked-by: Johan Hovold <jhov...@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);
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to