* [patch] gadgetfs: use after free in dev_release()
@ 2013-08-23 8:14 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-08-23 8:14 UTC (permalink / raw)
To: kernel-janitors
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>
---
Static checker stuff. I haven't tested this, but I'm pretty sure it's
correct.
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
index f255ad7..b94c049 100644
--- a/drivers/usb/gadget/inode.c
+++ b/drivers/usb/gadget/inode.c
@@ -1269,10 +1269,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;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-08-23 8:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-23 8:14 [patch] gadgetfs: use after free in dev_release() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox