public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: linux-usb-devel@lists.sourceforge.net, linux-scsi@vger.kernel.org
Subject: ugliness with USB hot-unplug
Date: Mon, 15 Nov 2004 21:28:58 -0800	[thread overview]
Message-ID: <20041115212858.29d3c73d.akpm@osdl.org> (raw)


So I made the mistake of forgetting to unmount the fat filesytem before
unplugging the USB cable from the digital camera.  I then tried to unmount
the old mountpoint.  khubd is sitting there chewing 100% CPU and I have a
reboot in my near future.

And this:

SCSI device sdd: 31680 512-byte hdwr sectors (16 MB)
sdd: test WP failed, assume Write Enabled
sdd: assuming drive cache: write through
 sdd: sdd1
Attached scsi removable disk sdd at scsi3, channel 0, id 0, lun 0
usb-storage: device scan complete
usb 4-2: USB disconnect, address 2
 target3:0:0: Illegal state transition <NULL>->cancel
Badness in scsi_device_set_state at drivers/scsi/scsi_lib.c:1713
 [<c0106acd>] dump_stack+0x19/0x20
 [<c026644a>] scsi_device_set_state+0xe2/0xf4
 [<c026126f>] scsi_device_cancel+0x1f/0x100
 [<c02613ef>] scsi_device_cancel_cb+0x17/0x1c
 [<c021f68e>] device_for_each_child+0x42/0x68
 [<c0261422>] scsi_host_cancel+0x2e/0xac
 [<c02614b5>] scsi_remove_host+0x15/0x68
 [<f88639c3>] storage_disconnect+0x77/0x8a [usb_storage]
 [<c027a33c>] usb_unbind_interface+0x3c/0x78
 [<c02203ff>] device_release_driver+0x57/0x6c
 [<c0220625>] bus_remove_device+0x51/0x98
 [<c021f608>] device_del+0x5c/0x84
 [<c02806eb>] usb_disable_device+0x67/0xe8
 [<c027c427>] usb_disconnect+0xc7/0x140
 [<c027d0f5>] hub_port_connect_change+0x71/0x338
 [<c027d5cc>] hub_events+0x210/0x2f4
 [<c027d6eb>] hub_thread+0x3b/0xf4
 [<c010428d>] kernel_thread_helper+0x5/0xc
scsi3 (0:0): rejecting I/O to dead device
FAT: Directory bread(block 7) failed
scsi3 (0:0): rejecting I/O to dead device
FAT: Directory bread(block 8) failed


The kernel profile points the finger at scsi_device_cancel():

00000000c0140c9c free_hot_cold_page                          290   1.1694
00000000c0145e5c release_pages                               366   0.9242
00000000c0149bb0 zap_pte_range                               508   0.7888
00000000c014b4e8 do_anonymous_page                          1338   3.8895
00000000c0117f04 do_page_fault                              1363   0.9361
00000000c0261250 scsi_device_cancel                        30137 117.7227
00000000c0104034 default_idle                              39011 750.2115


Seems to me that this is cruel and unusual punishment for simply forgetting
to type umount.  Any chance of getting it fixed up?

Thanks.

             reply	other threads:[~2004-11-16  5:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-16  5:28 Andrew Morton [this message]
2004-11-16 15:17 ` ugliness with USB hot-unplug James Bottomley

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=20041115212858.29d3c73d.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    /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