Opened 7 weeks ago

Closed 7 weeks ago

#15089 closed bug (fixed)

panic when booting with a CD in the drive

Reported by: korli Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Drivers/Disk Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Booting anyboot on a USB disk, this is triggered when a CD (in this case an audio CD) is in the drive.

this is a dirty hrev53137 x86_64 build.

Attachments (1)

SAM_7440_small.JPG (1.7 MB) - added by korli 7 weeks ago.
panic cd_read

Download all attachments as: .zip

Change History (4)

Changed 7 weeks ago by korli

Attachment: SAM_7440_small.JPG added

panic cd_read

comment:1 Changed 7 weeks ago by korli

This patch seems to help (can't reproduce after 5 reboots).

diff --git a/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp b/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp
index ccb707e78e..36270b8422 100644
--- a/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp
+++ b/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp
@@ -709,6 +709,8 @@ cd_uninit_device(void* _cookie)
 
        delete info->io_scheduler;
        delete info->dma_resource;
+       info->io_scheduler = NULL;
+       info->dma_resource = NULL;
 }
 
 
@@ -772,6 +774,9 @@ cd_read(void* cookie, off_t pos, void* buffer, size_t* _length)
        if (status != B_OK)
                return status;
 
+       if (handle->info->io_scheduler == NULL)
+               return B_DEV_NO_MEDIA;
+
        status = handle->info->io_scheduler->ScheduleRequest(&request);
        if (status != B_OK)
                return status;
@@ -800,6 +805,9 @@ cd_write(void* cookie, off_t pos, const void* buffer, size_t* _length)
        if (status != B_OK)
                return status;
 
+       if (handle->info->io_scheduler == NULL)
+               return B_DEV_NO_MEDIA;
+
        status = handle->info->io_scheduler->ScheduleRequest(&request);
        if (status != B_OK)
                return status;

comment:3 Changed 7 weeks ago by waddlesplash

Resolution: fixed
Status: newclosed

Merged in hrev53169.

Note: See TracTickets for help on using tickets.