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 <[email protected]>
---
 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);
                                return retval;
                        }
 
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to