From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: David Eccher <d.eccher@gmail.com>, Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Al Viro <viro@zeniv.linux.org.uk>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] USB: inode.c: fix unbalanced spin_lock in ep0_write
Date: Fri, 11 Dec 2015 23:57:23 +0300 [thread overview]
Message-ID: <566B38B3.8000106@cogentembedded.com> (raw)
In-Reply-To: <1449863786-7697-1-git-send-email-d.eccher@gmail.com>
Hello.
On 12/11/2015 10:56 PM, David Eccher wrote:
> Fix bad unlock balance: ep0_write enter with the locks locked from inode.c:1769,
> hence it must exit with spinlock held to avoid double unlock in dev_config.
>
> Signed-off-by: David Eccher <d.eccher@gmail.com>
> ---
> drivers/usb/gadget/legacy/inode.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c
> index f454c7a..b968c25 100644
> --- a/drivers/usb/gadget/legacy/inode.c
> +++ b/drivers/usb/gadget/legacy/inode.c
> @@ -1144,6 +1144,7 @@ ep0_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
> } else
> retval = len;
>
> + spin_lock_irq (&dev->lock);
I guess you hadn't run the patch thru scripts/checkpatch.pl?
MBR, Sergei
prev parent reply other threads:[~2015-12-11 20:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 19:56 [PATCH 1/1] USB: inode.c: fix unbalanced spin_lock in ep0_write David Eccher
2015-12-11 20:11 ` Al Viro
2015-12-11 21:12 ` David Eccher
2015-12-11 20:57 ` Sergei Shtylyov [this message]
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=566B38B3.8000106@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=balbi@ti.com \
--cc=d.eccher@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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