From: Johan Hovold <jhovold@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] USB: mos7720: use GFP_ATOMIC under spinlock
Date: Fri, 16 Aug 2013 10:12:10 +0000 [thread overview]
Message-ID: <20130816101210.GA10649@localhost> (raw)
In-Reply-To: <20130816071659.GA6053@elgon.mountain>
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);
next prev parent reply other threads:[~2013-08-16 10:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-16 7:16 [patch] USB: mos7720: use GFP_ATOMIC under spinlock Dan Carpenter
2013-08-16 10:12 ` Johan Hovold [this message]
2013-08-16 12:44 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130816101210.GA10649@localhost \
--to=jhovold@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox