Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1289894
| From | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/1] USB: inode.c: fix unbalanced spin_lock in ep0_write |
| Date | 2015-12-11 22:00 +0100 |
| Message-ID | <qECXg-10Z-9@gated-at.bofh.it> (permalink) |
| References | <qEC1c-q7-5@gated-at.bofh.it> |
| Organization | Cogent Embedded |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/1] USB: inode.c: fix unbalanced spin_lock in ep0_write David Eccher <d.eccher@gmail.com> - 2015-12-11 21:00 +0100
Re: [PATCH 1/1] USB: inode.c: fix unbalanced spin_lock in ep0_write Al Viro <viro@ZenIV.linux.org.uk> - 2015-12-11 21:20 +0100
Re: [PATCH 1/1] USB: inode.c: fix unbalanced spin_lock in ep0_write David Eccher <d.eccher@gmail.com> - 2015-12-11 22:20 +0100
Re: [PATCH 1/1] USB: inode.c: fix unbalanced spin_lock in ep0_write Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-12-11 22:00 +0100
csiph-web