From: Vegard Nossum <vegard.nossum@gmail.com>
To: Andrei Popa <andrei.popa@i-neo.ro>,
Oliver Neukum <oneukum@suse.de>,
Greg Kroah-Hartman <gregkh@suse.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: kernel oops
Date: Wed, 23 Jul 2008 19:11:44 +0200 [thread overview]
Message-ID: <20080723171144.GA7349@localhost.localdomain> (raw)
In-Reply-To: <1216817556.4415.29.camel@ierdnac>
Hi,
On Wed, Jul 23, 2008 at 2:52 PM, Andrei Popa <andrei.popa@i-neo.ro> wrote:
>
> Hello,
>
> 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
> *pde = 00000000
> Oops: 0002 [#1] PREEMPT SMP
>
> Pid: 19043, comm: gnokii Not tainted (2.6.26-ineo7 #2)
> EIP: 0060:[<c0444b52>] EFLAGS: 00010246 CPU: 0
> EIP is at mutex_unlock+0x0/0xb
...
> [<c03830ae>] acm_tty_open+0x4c/0x214
This shouldn't be too hard; the code is trying to unlock the mutex
&acm->mutex even when "acm" is NULL. It seems that the label "err_out"
is otherwise unused, so it makes sense to move this one step further
down, so that it doesn't try to unlock the non-existant mutex.
If the problem is reproducible, you could try the patch below!
Vegard
PS: I actually think the code has some other problems too. Shouldn't
&acm->mutex be locked before we even inspect acm->dev?
Reported-by: Andrei Popa <andrei.popa@i-neo.ro>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 63c3404..74d03a7 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -525,8 +525,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 15:12 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-23 12:52 kernel oops Andrei Popa
2008-07-23 13:23 ` [PATCH] cdc-acm: don't unlock acm->mutex on error path Alexey Dobriyan
2008-07-23 13:36 ` Andrei Popa
2008-07-23 17:11 ` Vegard Nossum [this message]
2008-08-18 16:33 ` kernel oops Vegard Nossum
2008-08-18 16:39 ` Greg KH
[not found] <e8eb01770803120245x7690e6a9te8ad04296aa3fc4d@mail.gmail.com>
2008-03-12 9:49 ` Zbynek Drlik
2008-03-12 10:33 ` Al Viro
2008-03-12 13:12 ` Zbynek Drlik
-- strict thread matches above, loose matches on Subject: below --
2008-02-05 12:57 Andrej Hocevar
2008-02-06 17:55 ` Len Brown
2006-09-12 10:21 Kernel Oops Marcin Prączko
2006-09-13 3:43 ` Andrew Morton
2005-10-15 1:03 Marc Perkel
2005-10-15 1:21 ` Randy.Dunlap
2005-10-15 1:43 ` Marc Perkel
2005-10-15 1:52 ` Randy.Dunlap
2005-01-03 21:10 Kernel oops Marat BN
2005-01-05 10:13 ` Andrew Morton
2004-06-11 7:27 tmp
2004-05-24 20:19 tmp
2004-05-16 12:08 Kernel OOPS tmp
2004-05-16 23:27 ` Andrew Morton
2004-05-17 0:33 ` tmp
2004-03-09 22:13 Kernel oops Philipp Baer
2004-03-09 23:11 ` Andrew Morton
2004-03-12 7:46 ` Philipp Baer
2004-02-08 11:05 Kernel Oops Mathieu LESNIAK
2004-02-08 16:35 ` Greg KH
2004-02-09 7:06 ` Mathieu LESNIAK
2003-11-28 23:15 Kernel oops Ville Jutvik
2003-11-28 5:45 Anderson Levi
2003-08-09 12:39 kernel oops Jean-Yves LENHOF
2003-08-09 20:37 ` Jean-Yves LENHOF
2003-08-09 9:28 Jean-Yves LENHOF
2003-07-18 19:44 Kernel OOPS Robert Scussel
2003-07-18 21:31 ` Alan Cox
2003-07-07 12:53 kernel oops Anders Karlsson
2003-07-07 13:14 ` Alan Cox
2003-07-07 13:32 ` Anders Karlsson
2003-07-07 13:37 ` Alan Cox
2003-07-07 13:56 ` Anders Karlsson
2003-07-08 9:39 ` Marcelo Tosatti
[not found] ` <200307072009.50677.bernd-schubert@web.de>
2003-07-08 5:13 ` Anders Karlsson
2003-05-31 1:32 Nadeem Riaz
2003-03-26 15:52 Steve Terrell
2003-02-03 1:18 Kernel Oops Daniel Espinoza
2003-02-03 3:23 ` vishwas
2002-08-09 5:25 sanket rathi
2002-06-23 19:39 Dirk Schmidt
2002-06-10 8:46 kernel oops Robert Litwiniec
2002-02-26 18:26 Suporte RedeBonja
2002-02-27 13:35 ` Erik Mouw
2001-11-13 13:23 Kernel oops Anthony
2001-11-14 6:02 ` Thiago Rondon
2001-10-08 12:59 kernel oops Terry Kendal
2001-09-27 9:49 kewl
2001-06-01 15:13 Kernel oops David Harris
2001-06-01 15:12 David Harris
2001-04-19 18:32 kernel oops Ronald Bultje
2001-04-19 19:04 ` Alan Cox
2001-04-19 19:08 ` Ronald Bultje
2001-02-19 14:44 Kernel Oops Alberto Bertogli
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=20080723171144.GA7349@localhost.localdomain \
--to=vegard.nossum@gmail.com \
--cc=andrei.popa@i-neo.ro \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=oneukum@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).