Proposed fix for scsi related boot crash
RFC 1/1 Proposed fix for scsi related boot crash
Hi
We have fedora bug report where system crash at boot when SCSI card is plugged into the system:
https://bugzilla.redhat.com/show_bug.cgi?id=781625
Since it is 3.1.2 -> 3.1.4 regression, it was easy to find out that the problem is caused by:
commit 4e6c82b3614a18740ef63109d58743a359266daf
Author: James Bottomley <[email protected]> Date: Mon Nov 7 08:51:24 2011 -0600
[SCSI] fix WARNING: at drivers/scsi/scsi_lib.c:1704
User confirmed that reverting the commit fixed the problem (and generates lot's of scsi/scsi_lib.c:1704 warnings).
The remain question is how to properly fix. My proposition is to revert 4e6c82b361 and nullify sdev->request_queue->queuedata what should fix the warning.
Thanks
Stanislaw
drivers/scsi/scsi_scan.c +9 -1
@@ -319,7 +319,15 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,return sdev; out_device_destroy: -__scsi_remove_device (sdev); +scsi_device_set_state (sdev,SDEV_DEL ); +transport_destroy_device (&sdev->sdev_gendev); +put_device (&sdev->sdev_dev); + +/* stop the block layer for our device */ + sdev->request_queue->queuedata =NULL ; +scsi_free_queue (sdev->request_queue); + +put_device (&sdev->sdev_gendev); out:if (display_failure_msg)printk (ALLOC_FAILURE_MSG , __func__);
James Bottomley
maintainerQuoted 5 lines · Stanislaw Gruszka
Hi
We have fedora bug report where system crash at boot when SCSI card is plugged into the system:
https://bugzilla.redhat.com/show_bug.cgi?id=781625
It will be fixed in stable by
commit cced5041ed5a2d1352186510944b0ddfbdbe4c0b
Author: Stratos Psomadakis <[email protected]> Date: Sun Dec 4 02:23:54 2011 +0200
[SCSI] sym53c8xx: Fix NULL pointer dereference in slave_destroy
James