From: Alexey Dobriyan <adobriyan@gmail.com>
To: Andrei Popa <andrei.popa@i-neo.ro>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org, gregkh@suse.de
Subject: [PATCH] cdc-acm: don't unlock acm->mutex on error path
Date: Wed, 23 Jul 2008 17:23:40 +0400 [thread overview]
Message-ID: <20080723132310.GB4894@martell.zuzino.mipt.ru> (raw)
In-Reply-To: <1216817556.4415.29.camel@ierdnac>
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
Try this:
[PATCH] cdc-acm: don't unlock acm->mutex on error path
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
drivers/usb/class/cdc-acm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -595,8 +595,8 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp)
tasklet_schedule(&acm->urb_task);
done:
-err_out:
mutex_unlock(&acm->mutex);
+err_out:
mutex_unlock(&open_mutex);
return rv;
next prev parent reply other threads:[~2008-07-23 13:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-23 12:52 kernel oops Andrei Popa
2008-07-23 13:23 ` Alexey Dobriyan [this message]
2008-07-23 13:36 ` [PATCH] cdc-acm: don't unlock acm->mutex on error path Andrei Popa
2008-07-23 17:11 ` kernel oops Vegard Nossum
2008-08-18 16:33 ` Vegard Nossum
2008-08-18 16:39 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080723132310.GB4894@martell.zuzino.mipt.ru \
--to=adobriyan@gmail.com \
--cc=akpm@osdl.org \
--cc=andrei.popa@i-neo.ro \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.