projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46c9844
)
USB: misc/vstusb, fix lock imbalance
author
Jiri Slaby
<jirislaby@gmail.com>
Wed, 11 Mar 2009 20:47:39 +0000
(21:47 +0100)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 17 Mar 2009 21:01:29 +0000
(14:01 -0700)
Make sure we don't leak locked vstdev->lock in vstusb_write. Unlock
properly on one fail path.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/misc/vstusb.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/misc/vstusb.c
b/drivers/usb/misc/vstusb.c
index 63dff9ba73c5d074bcd87ba13fcd4188dce81960..f26ea8dc15773dd8d3393ce25e92238c32fc99c2 100644
(file)
--- a/
drivers/usb/misc/vstusb.c
+++ b/
drivers/usb/misc/vstusb.c
@@
-401,6
+401,7
@@
static ssize_t vstusb_write(struct file *file, const char __user *buffer,
}
if (copy_from_user(buf, buffer, count)) {
+ mutex_unlock(&vstdev->lock);
dev_err(&dev->dev, "%s: can't copy_from_user\n", __func__);
retval = -EFAULT;
goto exit;