lkml.org 
[lkml]   [2015]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/1] USB: inode.c: fix unbalanced spin_lock in ep0_write
From
Date
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



\
 
 \ /
  Last update: 2015-12-11 22:21    [W:0.027 / U:0.896 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site