I wanted to be able to just pull and plugg (plug'n'play!) my USB memory without having to do a mount and umount every time. Especially I want to not have to to umount, because if I forget, the usb module crash hard. Now, I tried submount 0.9-r1. It mounts fine and automatic. but when I remove the USB memory I get the exact same error as if I had forgotten to umount the disk first. Reproducible: Always Steps to Reproduce: 1. mount the USB memory (mount /dev/sda1 /media/usb) 2. unplug the USB memory. 3. Watch as the kernel prints errors. Actual Results: usb 2-2.3: new full speed USB device using address 7 usb 2-2.3: not running at top speed; connect to a high speed hub scsi4 : SCSI emulation for USB Mass Storage devices usb 2-2.3: 400mA over 100mA budget! hub 2-2:1.0: 298mA over power budget! usb-storage: device found at 7 usb-storage: waiting for device to settle before scanning Vendor: I0MEGA Model: UMni128MB*IOM2E4 Rev: Type: Direct-Access ANSI SCSI revision: 00 SCSI device sda: 247808 512-byte hdwr sectors (127 MB) sda: assuming Write Enabled sda: assuming drive cache: write through /dev/scsi/host4/bus0/target0/lun0: p1 Attached scsi removable disk sda at scsi4, channel 0, id 0, lun 0 Attached scsi generic sg0 at scsi4, channel 0, id 0, lun 0, type 0 usb-storage: device scan complete usb 2-2.3: USB disconnect, address 7 scsi4 (0:0): rejecting I/O to device being removed Buffer I/O error on device sda1, logical block 1960 lost page write due to I/O error on sda1 target4:0:0: Illegal state transition <NULL>->cancel Badness in scsi_device_set_state at drivers/scsi/scsi_lib.c:1713 [<b02c4722>] scsi_device_set_state+0xb2/0x136 [<b02bfda2>] scsi_device_cancel+0x26/0xe7 [<b02bfea2>] scsi_device_cancel_cb+0x0/0xc [<b0296102>] device_for_each_child+0x35/0x5e [<b02bfed4>] scsi_host_cancel+0x26/0xb1 [<b0167abe>] dput+0x76/0x209 [<b02c5ccb>] scsi_forget_host+0x35/0x4f [<b02bff70>] scsi_remove_host+0x11/0x59 [<f0d2fb11>] storage_disconnect+0x7d/0x8f [usb_storage] [<b02cd0fc>] usb_unbind_interface+0x5e/0x60 [<b0296d61>] device_release_driver+0x56/0x58 [<b0296f67>] bus_remove_device+0x53/0x90 [<b029608e>] device_del+0x54/0x83 [<b02d38c0>] usb_disable_device+0x60/0xc5 [<b02cf23f>] usb_disconnect+0xa7/0x151 [<b02d0143>] hub_port_connect_change+0x26c/0x3ad [<b02d0419>] hub_events+0x195/0x343 [<b02d05fe>] hub_thread+0x37/0xe7 [<b012eaad>] autoremove_wake_function+0x0/0x43 [<b0103cf6>] ret_from_fork+0x6/0x14 [<b012eaad>] autoremove_wake_function+0x0/0x43 [<b02d05c7>] hub_thread+0x0/0xe7 [<b0102049>] kernel_thread_helper+0x5/0xb Unable to handle kernel paging request at virtual address 759ae353 printing eip: b02bfdb2 *pde = 00000000 Oops: 0000 [#1] PREEMPT SMP Modules linked in: subfs vfat fat sg sd_mod usb_storage agpgart nvidia CPU: 1 EIP: 0060:[<b02bfdb2>] Tainted: P VLI EFLAGS: 00010082 (2.6.9-mm1) EIP is at scsi_device_cancel+0x36/0xe7 eax: 00000213 ebx: caa34670 ecx: 00000001 edx: 759ae353 esi: 759ae343 edi: efcb5e28 ebp: caa34694 esp: efcb5e20 ds: 007b es: 007b ss: 0068 Process khubd (pid: 109, threadinfo=efcb4000 task=eff5ba40) Stack: 00000213 00000000 efcb5e28 efcb5e28 caa34804 eca7e4ec b0463228 b02bfea2 b0296102 efcb5e5c eca7e400 f0d33720 b89db600 efd4d9b8 b02bfed4 00000000 ea364950 b0167abe bd09fdb8 caa34804 eca7e400 bd09fd94 caa34804 bd09fc00 Call Trace: [<b02bfea2>] scsi_device_cancel_cb+0x0/0xc [<b0296102>] device_for_each_child+0x35/0x5e [<b02bfed4>] scsi_host_cancel+0x26/0xb1 [<b0167abe>] dput+0x76/0x209 [<b02c5ccb>] scsi_forget_host+0x35/0x4f [<b02bff70>] scsi_remove_host+0x11/0x59 [<f0d2fb11>] storage_disconnect+0x7d/0x8f [usb_storage] [<b02cd0fc>] usb_unbind_interface+0x5e/0x60 [<b0296d61>] device_release_driver+0x56/0x58 [<b0296f67>] bus_remove_device+0x53/0x90 [<b029608e>] device_del+0x54/0x83 [<b02d38c0>] usb_disable_device+0x60/0xc5 [<b02cf23f>] usb_disconnect+0xa7/0x151 [<b02d0143>] hub_port_connect_change+0x26c/0x3ad [<b02d0419>] hub_events+0x195/0x343 [<b02d05fe>] hub_thread+0x37/0xe7 [<b012eaad>] autoremove_wake_function+0x0/0x43 [<b0103cf6>] ret_from_fork+0x6/0x14 [<b012eaad>] autoremove_wake_function+0x0/0x43 [<b02d05c7>] hub_thread+0x0/0xe7 [<b0102049>] kernel_thread_helper+0x5/0xb Code: 24 89 54 24 04 8d 7c 24 08 ba 03 00 00 00 89 7c 24 08 89 7c 24 0c e8 ce 48 00 00 89 e8 e8 d7 ad 0f 00 89 04 24 8b 53 2c 8d 72 f0 <8b> 46 10 0f 18 00 90 83 c3 2c eb 3a 8b 86 c0 00 00 00 85 c0 74 <6>note: khubd[109] exited with preempt_count 1 scsi4 (0:0): rejecting I/O to dead device FAT: Directory bread(block 1960) failed scsi4 (0:0): rejecting I/O to dead device FAT: Directory bread(block 1961) failed then I tried to force a umount with umount /media/usb -f: scsi4 (0:0): rejecting I/O to dead device FAT: Directory bread(block 1960) failed scsi4 (0:0): rejecting I/O to dead device FAT: Directory bread(block 1961) failed subfs: submountd execution failure. Error 256 subfs: submountd execution failure. Error 256 Expected Results: I expected a clean umount =) Portage 2.0.51-r3 (default-linux/x86/2004.2/gcc34/2.6, gcc-3.4.2, glibc-2.3.4.20040808- r1, 2.6.9-mm1 i686) =================================================== ============== System uname: 2.6.9-mm1 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz Gentoo Base System version 1.4.16 distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux26-headers-2.6.8.1-r1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://ds.thn.htu.se/linux/gentoo http://mirror.pudas.net/gentoo ftp://mirror.pudas.net/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X aalib acl acpi alsa apm arts audiofile avi berkdb bidi bitmap-fonts cdr crypt cups dga directfb doc dvd dvdr encode esd faad fam fbcon flac foomaticdb fortran gdbm gif gnome gphoto2 gpm gtk gtk2 hal imagemagick imlib ipv6 java jpeg jpeg2k junit kde lcms libcaca libwww mad mikmod mmx motif mpeg ncurses nls nptl nvidia oggvorbis opengl oss pam pdflib perl pic png python qt quicktime readline samba sdl slang speex spell sse ssl svga tcpd tga theora threads tiff truetype unicode wifi wmf wxwindows xml2 xmms xv xvid xvmc zlib"
We don't support mm-sources, sorry. However if you can reproduce this with 2.6.10 (e.g. gentoo-dev-sources) then please reopen this bug.
I tried with 2.6.10 and the crash does not occur - so all is good =) Though submount still cause problems but that is another thing perhaps.