Author: Mark Gross <[EMAIL PROTECTED]>
AuthorDate: Mon Sep 24 09:28:14 2007 -0700
Committer: Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 14:55:26 2007 -0700
USB: usb-skeleton leaking locks on open
This weekend I was hacking around with a trivial USB driver for talking
to the boot load firmware of a USB Bit Whacker. It's running the
MicroChip Pic18 boot loader firmware and I'm putting together a flash
program for writing new FW to the thing.
Anyway in my use of the usb-skeleton.c as my starting point I discovered
my test program was getting hung up after attempting to write a buffer.
The application and driver where hung in a way that required me to
reboot to get it to clean up so I could try again.
It turned out the code path through skel_open can grap the driver's
io_mutex lock and forget to release it.
The following patch fixes the problem for me.
Signed-off-by: Mark Gross <[EMAIL PROTECTED]>
Cc: Oliver Neukum <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
drivers/usb/usb-skeleton.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c
index 8de11de..c815a40 100644
@@ -125,6 +125,7 @@ static int skel_open(struct inode *inode, struct file *file)
/* save our object in the file's private structure */
file->private_data = dev;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html