Bug 145256
Summary: | INQUIRY commands crash many USB storage devices | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Steve Bangert <sbangert> |
Component: | hal | Assignee: | David Zeuthen <davidz> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3 | CC: | mclasen |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://marc.theaimsgroup.com/?t=110570762200001&r=1&w=2 | ||
Whiteboard: | |||
Fixed In Version: | 0.4.7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-01-25 03:51:54 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Steve Bangert
2005-01-16 00:29:53 UTC
> When using my Sandisk cruzer mini HAL crashes USB storage at times.
> According to Allen Stern ( linux USB storage developer) HAL is sending
> INQUIRY commands of 255 bytes when it should send 36 bytes, this
> crashes USB storage.
HAL doesn't send INQUIRY commands, it simply uses open(2), read(2)
etc. on the device file. What you're seeing is a defect with the
either the usb-storage driver or the SCSI midlayer, not with hald.
David is absolutely wrong about where the defect lies. Opening a SCSI disk device file (like /dev/sda or /dev/sda1) does _not_ cause any of the SCSI layers, including usb-storage, to send an INQUIRY command. I have used a separate program many times to open(2) and read(2) device files in this way; the only commands generated are TEST UNIT READY, PREVENT MEDIUM REMOVAL, and READ(10). The INQUIRY command must be generated somewhere else, outside the kernel. Now, it might not be generated by hald. It might come from a program or a library invoked by hald (or even from somewhere else entirely, although that seems unlikely since Steve says his problem stops when hald isn't running). Unfortunately I can't test this easily on my system. hald crashes soon after starting with a segmentation violation when it tries handling one of the USB buses. I stand corrected; after more thourough inspection of the code we do indeed send a INQUIRY for attempting to read the drive_id off page 0x80. I will investigate this issue and provide some packages for testing. Thanks for the notice and sorry for initially dismissing this bug. Hi, Please try out these packages http://people.redhat.com/davidz/hal-cvs20050121/ which should contain the fix for this. Thanks, David David, The above packages appear to have fixed the USB storage issue, on an unrelated concern I'm having problems with hald dying/sleeping after my machine has been up and running for an hour or more, would you like me to continue on this bug report or open a new one? Steve Please open a new bug report for the other issue. Thanks, David. |