linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duncan Sands <baldrick@free.fr>
To: Vince <fuzzy77@free.fr>, Zwane Mwaikambo <zwane@arm.linux.org.uk>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	"Randy.Dunlap" <rddunlap@osdl.org>
Subject: Re: [kernel panic @ reboot in usbcore] 2.6.0-test10-mm1 (culprit: modem_run)
Date: Thu, 27 Nov 2003 09:11:17 +0100	[thread overview]
Message-ID: <200311270911.17999.baldrick@free.fr> (raw)
In-Reply-To: <3FC54C7E.50904@free.fr>

This looks like a problem I have been seeing.  I have a fix for this
in the works.  Unfortunately I'm pretty busy right now, so I can't
say when I'll have it ready.  The problem is in drivers/usb/core/devio.c.
Actually there are lots of problems in devio.c :)  One problem is that
devio.c is not protected against actconfig changing under it (thanks
to a usb core change, it becomes NULL before becoming something
else, which causes devio.c to oops rather than quietly do the wrong
thing).  The use of dev->serialize (usb semaphore) in releaseintf is
also wrong because it can lead to deadlock.  Another problem comes
from devio.c (i.e. usbfs) thinking that disconnects are for the whole
device and not just an interface.  Furthermore, there are various
oopsen that come from devio.c not handling urb unlink failures.
That's all I remember off the top of my head :)  I sent a couple of
emails about this (especially the locking problems) to the usb
mailing list lately.  Hang on, I just remembered another one:
releaseintf needs to be called with a write lock taken on
ps->devsem rather than a read lock, otherwise it can boot other
parts of devio.c off an interface when they think they still have
it.

Ciao,

Duncan.


On Thursday 27 November 2003 01:59, Vince wrote:
> It worked, but I had -- as expected -- to write the oops by hand.
> (user request to Randy: would it be possible to have an option in
> kmsgdump to only write the first oops on floppy ???)
>
> I it have all on paper, but I'm too lazy to write the full stack right
> now (available later on request: I have to go to bed now 8):
>
> ------------------------------------------------------------------
> CPU: 0
> EIP: 0060 : [<d0ae9822>]
> EFLAGS: 00010246
> EIP is at releaseintf+0x62/0x80 [usbcore]
> eax:00000000 ebx:ceddc224 ecx:cs6D5DC0 edx:00000000
> esi:ceddc200 edi:00000000 ebp:cd647f0c esp:cd647ef8
> ds: 007b es:007b ss:0068
>
> Process: modem_run (pid: 1121, threadinfo=cd646000, task=ce644040)
> Stack: c016ffe3 ce0bfb24 ce6d5dc0 ...
> [...]
>
> Call trace
> [<c016ffe3>] iput+0x63/0x80
> [<d0ae9c27>] usbdev_release+0xb7/0xc0 [usbcore]
> [<c0157a5c>] __fput+0x10c/0x120
> [<c0156047>] filp_close+0x57/0x80
> [<c0123d17>] put_files_struct+0x67/0xd0
> [<c012491e>] do_exit+0x3a/0xb0
> [<c0124c4a>] do_group_exit+0x3a/0xb0
> [<c02a302e>] sysenter_past_esp+0x43/0x65
> -------------------------------------------------------------------
>
> The modem_run process is the one uploading the firmware for my
> speedtouch dsl modem. I'm using the kernel-space speedtouch driver, with
> modem_run from http://speedtouch.sourceforge.net/
> Manually shutting down the network and killing modem_run before
> rebooting makes the oops disapear.
>
>   However, I believe the fact that modem_run can cause a kernel panic is
> still a bug that should be fixed. I'm willing to test any patch to fix
> this issue that has ennoyed me since a long time (in the meantime, I'll
> work around this in my shutdown scripts). :-)
>
> Zwane Mwaikambo wrote:
> > On Wed, 26 Nov 2003, Vince wrote:
> >>>*groan* do you have a PDA?
> >>
> >>Nope. I could probably borrow a laptop to a friend but am not excited at
> >>the idea of having to setup some serial console thing (I do not even
> >>have a serial cable). Dump to floppy/swap/disk would be much easier in
> >>my case... if it could me made to work, of course ;-)
> >
> > Those oopses looked rather spurious, i'm not sure what help those other
> > methods would be here. Try applying the following patch and be sure to
> > have access to the console. You may have to hand transcribe...
> >
> > Index: linux-2.6.0-test10-mm1-bochs/arch/i386/kernel/traps.c
> > ===================================================================
> > RCS file:
> > /build/cvsroot/linux-2.6.0-test10-mm1/arch/i386/kernel/traps.c,v
> > retrieving revision 1.1.1.1
> > diff -u -p -B -r1.1.1.1 traps.c
> > --- linux-2.6.0-test10-mm1-bochs/arch/i386/kernel/traps.c	26 Nov 2003
> > 05:28:50 -0000	1.1.1.1 +++
> > linux-2.6.0-test10-mm1-bochs/arch/i386/kernel/traps.c	26 Nov 2003
> > 18:17:37 -0000 @@ -329,6 +329,10 @@ void die(const char * str, struct
> > pt_reg
> >  	if (in_interrupt())
> >  		panic("Fatal exception in interrupt");
> >
> > +	local_irq_disable();
> > +	while (1)
> > +		__asm__ __volatile__("hlt");
> > +
> >  	if (panic_on_oops) {
> >  		printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
> >  		set_current_state(TASK_UNINTERRUPTIBLE);
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

      parent reply	other threads:[~2003-11-27  8:13 UTC|newest]

Thread overview: 113+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-26 16:51 [kernel panic @ reboot] 2.6.0-test10-mm1 Vince
2003-11-26 17:16 ` Zwane Mwaikambo
2003-11-26 17:34   ` Vince
2003-11-26 17:35     ` Randy.Dunlap
2003-11-26 17:40     ` Zwane Mwaikambo
2003-11-26 17:54       ` Vince
2003-11-26 18:18         ` Zwane Mwaikambo
2003-11-26 23:37           ` Mike Fedyk
2003-11-26 23:41             ` Vince
2003-12-03  0:03               ` Randy.Dunlap
2003-12-03  0:31                 ` Mike Fedyk
2003-12-03  0:27                   ` Randy.Dunlap
2003-12-03 13:28                     ` Vince
2003-12-03 19:12                       ` Zwane Mwaikambo
2003-12-04  1:01                         ` Vince
2003-12-04  1:34                           ` Mike Fedyk
2003-12-04  4:11                             ` Randy.Dunlap
2003-12-04 10:59                               ` [OOPS, usbcore, releaseintf] 2.6.0-test10-mm1 Vince
2003-12-04 11:14                                 ` Duncan Sands
2003-12-04 16:57                                   ` Randy.Dunlap
2003-12-05  7:38                                     ` Duncan Sands
2003-12-05 10:11                                       ` Vince
2003-12-05 10:18                                         ` Duncan Sands
2003-12-05 10:34                                           ` Vince
2003-12-07  0:25                                         ` Duncan Sands
2003-12-07 21:09                                           ` Vince
2003-12-07 21:24                                             ` Duncan Sands
2003-12-07 22:24                                               ` Vince
2003-12-07 22:54                                               ` Vince
2003-12-08 10:10                                                 ` Duncan Sands
2003-12-08 16:03                                                   ` [linux-usb-devel] " David Brownell
2003-12-08 16:15                                                     ` Duncan Sands
2003-12-08 16:31                                                       ` Alan Stern
2003-12-08 17:20                                                         ` David Brownell
2003-12-08 17:59                                                         ` Duncan Sands
2003-12-08 18:35                                                           ` Alan Stern
2003-12-08 19:53                                                             ` Duncan Sands
2003-12-08 21:32                                                               ` Alan Stern
2003-12-08 21:55                                                                 ` Duncan Sands
2003-12-08 23:09                                                                   ` Alan Stern
2003-12-09 10:23                                                                     ` Duncan Sands
2003-12-09 15:55                                                                       ` Alan Stern
2003-12-09 20:36                                                                         ` Duncan Sands
2003-12-09 10:36                                                                     ` Duncan Sands
2003-12-09 16:08                                                                       ` Alan Stern
2003-12-09 20:24                                                                         ` Duncan Sands
2003-12-09 10:49                                                                     ` Duncan Sands
2003-12-09 15:47                                                                       ` Alan Stern
2003-12-09 21:12                                                                         ` Duncan Sands
2003-12-09 21:58                                                                           ` Alan Stern
2003-12-09 22:07                                                                             ` Duncan Sands
2003-12-09 22:25                                                                               ` David Brownell
2003-12-09 22:33                                                                                 ` Duncan Sands
2003-12-10  3:12                                                                                   ` David Brownell
2003-12-10  3:43                                                                                 ` Alan Stern
2003-12-10 13:12                                                                                   ` Duncan Sands
2003-12-10 15:13                                                                                     ` Alan Stern
2003-12-10 15:30                                                                                   ` Greg KH
2003-12-10 16:02                                                                                     ` Duncan Sands
2003-12-10 20:53                                                                                       ` Greg KH
2003-12-11  8:49                                                                                         ` Duncan Sands
2003-12-11  9:23                                                                                           ` Greg KH
2003-12-11  9:29                                                                                             ` Duncan Sands
2003-12-10 17:25                                                                                     ` Alan Stern
2003-12-10 20:46                                                                                       ` Greg KH
2003-12-10 21:08                                                                                         ` Greg KH
2003-12-11  2:10                                                                                           ` Vince
2003-12-11  6:46                                                                                             ` Greg KH
2003-12-10 22:08                                                                                         ` Alan Stern
2003-12-11  6:47                                                                                           ` Greg KH
2003-12-10  4:31                                                                               ` Vince
2003-12-10  1:49                                                                       ` Greg KH
2003-12-10 13:22                                                                     ` Duncan Sands
2003-12-10 16:20                                                                       ` Oliver Neukum
2003-12-10 16:49                                                                         ` Duncan Sands
2003-12-10 16:58                                                                           ` Oliver Neukum
2003-12-11  9:45                                                                             ` Duncan Sands
2003-12-11 10:19                                                                               ` Oliver Neukum
2003-12-11 21:43                                                                                 ` Duncan Sands
2003-12-11 22:57                                                                                   ` Oliver Neukum
2003-12-11 23:30                                                                                     ` Duncan Sands
2003-12-12  0:02                                                                                     ` David Brownell
2003-12-10 17:34                                                                           ` David Brownell
2003-12-10 17:54                                                                             ` Duncan Sands
2003-12-10 18:19                                                                               ` Alan Stern
2003-12-11  9:36                                                                                 ` Duncan Sands
2003-12-11 15:19                                                                                   ` Alan Stern
2003-12-11 21:23                                                                                     ` Duncan Sands
2003-12-12 15:46                                                                                       ` Alan Stern
2003-12-11 21:29                                                                                     ` Duncan Sands
2003-12-12 16:18                                                                                       ` Alan Stern
2003-12-12 18:37                                                                                         ` David Brownell
2003-12-12 19:17                                                                                           ` Alan Stern
2003-12-12 19:45                                                                                             ` David Brownell
2003-12-12 20:48                                                                                               ` Alan Stern
2003-12-12 21:01                                                                                                 ` Oliver Neukum
2003-12-12 21:27                                                                                                   ` Alan Stern
2003-12-12 23:36                                                                                                     ` Oliver Neukum
2003-12-13  1:10                                                                                                       ` Alan Stern
2003-12-13 11:52                                                                                                         ` Oliver Neukum
2003-12-12 18:50                                                                                         ` Oliver Neukum
2003-12-10 19:43                                                                               ` David Brownell
2003-12-11  9:21                                                                                 ` Duncan Sands
2003-12-10 17:21                                                                       ` David Brownell
2003-12-11  9:42                                                                         ` Duncan Sands
2003-12-12  2:21                                                           ` David Brownell
2003-12-12  8:47                                                             ` Duncan Sands
2003-12-12 15:35                                                             ` bill davidsen
2003-12-05  0:08                               ` [kernel panic @ reboot] 2.6.0-test10-mm1 Zwane Mwaikambo
2003-11-27  0:59           ` [kernel panic @ reboot in usbcore] 2.6.0-test10-mm1 (culprit: modem_run) Vince
2003-11-27  3:13             ` Zwane Mwaikambo
2003-11-27  8:14               ` Vince
2003-11-27  8:11             ` Duncan Sands [this message]

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=200311270911.17999.baldrick@free.fr \
    --to=baldrick@free.fr \
    --cc=fuzzy77@free.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rddunlap@osdl.org \
    --cc=zwane@arm.linux.org.uk \
    /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).