projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c078a37
)
usb: gadget: gadgetfs: use after free in dev_release()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Fri, 23 Aug 2013 08:14:49 +0000
(11:14 +0300)
committer
Felipe Balbi
<balbi@ti.com>
Tue, 27 Aug 2013 20:03:28 +0000
(15:03 -0500)
The call to put_dev() releases "dev". Hopefully, we don't need to set
the state to STATE_DEV_DISABLED anyway so I have removed those lines.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/inode.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/gadget/inode.c
b/drivers/usb/gadget/inode.c
index 570c005062ab8a3c75a9da56131ffebfdce118aa..465ef8e2cc910e04ffd5194fddbf3b14391887c0 100644
(file)
--- a/
drivers/usb/gadget/inode.c
+++ b/
drivers/usb/gadget/inode.c
@@
-1270,10
+1270,6
@@
dev_release (struct inode *inode, struct file *fd)
dev->buf = NULL;
put_dev (dev);
- /* other endpoints were all decoupled from this device */
- spin_lock_irq(&dev->lock);
- dev->state = STATE_DEV_DISABLED;
- spin_unlock_irq(&dev->lock);
return 0;
}