Opened 13 years ago
Closed 13 years ago
#376 closed defect (fixed)
Crash in usbmast during boot
Reported by: | Jakub Jermář | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 0.5.0 |
Component: | helenos/drv/usbmast | Version: | mainline |
Keywords: | Cc: | ||
Blocker for: | Depends on: | ||
See also: |
Description
As of mainline,1234, usbmast driver crashes on my desktop computer (ia32, UP) during boot as follows:
[usbmast] info: Initializing `mass-storage0`. [usbmast] info: Mass storage `mass-storage0` LUN 0: USB SD Reader by Generic rev. 1.00 is Direct- [usbmast] ERROR: Inquiry transport failed, device mass-storage0: Unknown error code -265. [usbmast] ERROR: Read Capacity (10) transport failed, device mass-storage0: Unknown error code -26 [usbmast] WARN: Failed to read cpapacity, device `mass-storage0`: Unknown error code -265. Assertion failed (head->size == foot->size) in file "generic/malloc.c", line 255. Assertion failed (head->size == foot->size) in file "generic/malloc.c", line 255.
And the following stack-trace (abbreviated) is printed:
free+375 driver_connection+1113 connection_fibril+82 fibril_main+25
/log/usbmast
repeats the info:, ERROR: and WARN: lines above, interleaved by:
[usbmast]: Bulk in endpoint: 2 [64B]. [usbmast]: Bulk out endpoint: 1 [64B]. [usbmast]: Get LUN count... [usbmast]: Inquire...
Change History (3)
comment:1 by , 13 years ago
comment:3 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Ok, I think the problem might be that
usbmast_fun_create()
sets both device and function driver data to point to the same buffer, i.e.mfun
. This buffer is later freed by both DDFdelete_device()
anddelete_function()
. The following patch seems to fix the crash ofusbmast
during system startup. Later, after plugging in a flash disk, the disk is recognized by the driver and l0 (for lun0) child node is created. I am unfortunately not clever enough to figure out how to specify the new block device e.g. to the bdd builtin or the mount builtin.Jiri, do you think the following patch is appropriate?