Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44663 - Oops when unplugging USB device on kernel 2.6.4-mm1
Summary: Oops when unplugging USB device on kernel 2.6.4-mm1
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-14 05:10 UTC by Guy Van Sanden
Modified: 2004-04-02 00:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guy Van Sanden 2004-03-14 05:10:53 UTC
When I plug in an USB device in kernel 2.6.4-mm1, it works, but an Oops is generated on unplugging that device.
After the Oops, USB is dead in the water, even shutting down doesn't work...

kernel 2.6.4-rc2-mm1 worked fine.

Reproducible: Always
Steps to Reproduce:
1. Boot up 2.6.4-mm1
2. Plug in USB device (USB stick)
3. Unplug the device
4. Get the error in dmesg

Actual Results:  
usb 2-1.3: USB disconnect, address 3
Unable to handle kernel NULL pointer dereference at virtual address 00000008
 printing eip:
c018c8ff
*pde = 00000000
Oops: 0000 [#1]
PREEMPT
CPU:    0
EIP:    0060:[<c018c8ff>]    Tainted: PF  VLI
EFLAGS: 00010282   (2.6.4-mm1)
EIP is at sysfs_hash_and_remove+0xf/0x7d
eax: 00000000   ebx: d569be90   ecx: c03ada9b   edx: d569bd7c
esi: 00000000   edi: 00000000   ebp: dc23c600   esp: dfd23e08
ds: 007b   es: 007b   ss: 0068
Process khubd (pid: 188, threadinfo=dfd22000 task=dfd6a5f0)
Stack: d569be3c d569be34 d569be90 d569be90 c028dcd6 00000000 c03ada9b c028e0dd
       d569be90 c042a20c d569be90 d569bd7c dc23c5f8 dc23c600 c028e133 d569be90
       d569bc00 c02d2324 d569be90 dfd22000 d569bc00 c02d1704 d569bc00 dc23c600
Call Trace:
 [<c028dcd6>] class_device_dev_unlink+0x26/0x30
 [<c028e0dd>] class_device_del+0x7d/0xc0
 [<c028e133>] class_device_unregister+0x13/0x30
 [<c02d2324>] scsi_remove_device+0x54/0xa0
 [<c02d1704>] scsi_forget_host+0x44/0x90
 [<c02cb5e9>] scsi_remove_host+0x29/0x60
 [<e1881e48>] storage_disconnect+0x38/0x48 [usb_storage]
 [<e1848117>] usb_unbind_interface+0x77/0x80 [usbcore]
 [<c028d3e6>] device_release_driver+0x66/0x70
 [<c028d525>] bus_remove_device+0x55/0xa0
 [<c028c41d>] device_del+0x5d/0xa0
 [<c028c473>] device_unregister+0x13/0x30
 [<e184e154>] usb_disable_device+0x74/0xe0 [usbcore]
 [<c0121ce0>] printk+0x130/0x190
 [<e1848d04>] usb_disconnect+0x94/0xf0 [usbcore]
 [<e184ac81>] hub_port_connect_change+0x281/0x290 [usbcore]
 [<e184a623>] hub_port_status+0x43/0xb0 [usbcore]
 [<e184af57>] hub_events+0x2c7/0x340 [usbcore]
 [<e184b005>] hub_thread+0x35/0x100 [usbcore]
 [<c0376676>] ret_from_fork+0x6/0x14
 [<c011dd60>] default_wake_function+0x0/0x20
 [<e184afd0>] hub_thread+0x0/0x100 [usbcore]
 [<c01072ad>] kernel_thread_helper+0x5/0x18

Code: 24 89 44 24 04 8d 44 24 08 89 04 24 e8 7b 90 fd ff 83 c4 18 5b 5f c3 90 8d
74 26 00 83 ec 10 89 74 24 0c 8b 74 24 14 89 5c 24 08 <8b> 46 08 8d 48 70 ff 48
70 78 63 89 34 24 8b 44 24 18 89 44 24

USB is dead in the water from now on...

Expected Results:  
2.6.4-rc2-mm1 works fine, I can plug and unplug USB devices at will

Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.4-mm1)
=================================================================
System uname: 2.6.4-mm1 i686 AMD Athlon(tm) XP 1700+
Gentoo Base System version 1.4.3.13
distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config
/usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://194.83.57.3/sites/www.ibiblio.org/gentoo/
http://ftp.easynet.nl/mirror/gentoo/
http://194.83.57.2/sites/www.ibiblio.org/gentoo/
http://194.83.57.15/sites/www.ibiblio.org/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X acpi alsa apm arts avi berkdb bonobo cdr crypt cups doc dvd encode
esd evo foomaticdb gdbm gif gnome gpm gtk gtk2 gtkhtml imlib java jpeg kde
kerberos ldap libg++ libwww mad mikmod mmx motif mozilla mpeg mysql ncurses nls
oggvorbis opengl oss pam pda pdflib perl png python qt quicktime readline
scanner sdl slang spell sse ssl svga tcltk tcpd truetype usb x86 xml2 xmms xosd
xv zlib"
Comment 1 Tim Yamin (RETIRED) gentoo-dev 2004-03-14 06:34:52 UTC
Hmm; can you try backing out http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.4/2.6.4-mm1/broken-out/bk-usb.patch and see if that solves anything?
Comment 2 Guy Van Sanden 2004-03-14 08:01:29 UTC
> Hmm; can you try backing out http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.4/2.6.4-mm1/broken-out/bk-usb.patch and see if that solves anything?

How do I do this?
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2004-03-14 08:14:37 UTC
# cd /usr/src/linux-2.6.4-mm1
# wget http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.4/2.6.4-mm1/broken-out/bk-usb.patch
# patch -p1 -R < bk-usb.patch

Then just recompile your kernel as usual...
Comment 4 Guy Van Sanden 2004-03-15 10:37:48 UTC
I tried it, but it is no different
Comment 5 Guy Van Sanden 2004-03-16 02:52:30 UTC
It works fine again on 2.6.4-mm2, so This case can be closed
Comment 6 Jason Cox (RETIRED) gentoo-dev 2004-04-02 00:54:07 UTC
Fixed with later mm.
Comment 7 Jason Cox (RETIRED) gentoo-dev 2004-04-02 00:54:39 UTC
Problem upstream that has been fixed with later releases.