diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-08-20 19:56:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-08-21 13:26:35 -0400 |
commit | 74573ee7096a4ffc2f098108d21c85801b9c7434 (patch) | |
tree | d7d4e43b620a5d4a0bda7b077774057922941e8c /drivers/usb/class | |
parent | fb85d991616046f1b640ed9c4eab9b44908dab74 (diff) |
USB: cdc-acm: don't unlock acm->mutex on error path
On Wed, Jul 23, 2008 at 03:52:36PM +0300, Andrei Popa wrote:
> I installed gnokii-0.6.22-r2 and gave the command "gnokii --identify"
> and the kernel oopsed:
>
> BUG: unable to handle kernel NULL pointer dereference at 00000458
> IP: [<c0444b52>] mutex_unlock+0x0/0xb
> [<c03830ae>] acm_tty_open+0x4c/0x214
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Tested-by: Andrei Popa <andrei.popa@i-neo.ro>
Cc: stable <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 382522eb1f7e..c257453fa9de 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -589,8 +589,8 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp) | |||
589 | tasklet_schedule(&acm->urb_task); | 589 | tasklet_schedule(&acm->urb_task); |
590 | 590 | ||
591 | done: | 591 | done: |
592 | err_out: | ||
593 | mutex_unlock(&acm->mutex); | 592 | mutex_unlock(&acm->mutex); |
593 | err_out: | ||
594 | mutex_unlock(&open_mutex); | 594 | mutex_unlock(&open_mutex); |
595 | return rv; | 595 | return rv; |
596 | 596 | ||