Bug 145256 - INQUIRY commands crash many USB storage devices
INQUIRY commands crash many USB storage devices
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Zeuthen
http://marc.theaimsgroup.com/?t=11057...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-15 19:29 EST by Steve Bangert
Modified: 2013-03-05 22:42 EST (History)
1 user (show)

See Also:
Fixed In Version: 0.4.7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-24 22:51:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Steve Bangert 2005-01-15 19:29:53 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041111 Firefox/1.0

Description of problem:
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.

Version-Release number of selected component (if applicable):
HAL-0.4.5-1-FC3

How reproducible:
Sometimes

Steps to Reproduce:
1.plugin Sandisk cruzer mini
2.wait for icon to appear on desktop
3.
    

Actual Results:  USB storage fails 

Expected Results:  contents of Sandisk crizer mini should be available

Additional info:
Comment 1 David Zeuthen 2005-01-20 13:57:28 EST
> 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.
Comment 2 Alan Stern 2005-01-20 16:36:32 EST
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.
Comment 3 David Zeuthen 2005-01-20 16:59:31 EST
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.
Comment 4 David Zeuthen 2005-01-21 11:05:17 EST
Hi,

Please try out these packages

 http://people.redhat.com/davidz/hal-cvs20050121/

which should contain the fix for this.

Thanks,
David
Comment 5 Steve Bangert 2005-01-21 15:56:25 EST
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
Comment 6 David Zeuthen 2005-01-24 22:51:54 EST
Please open a new bug report for the other issue. Thanks, David.

Note You need to log in before you can comment on or make changes to this bug.