User: | Jiri Slaby |
Error type: | Invalid Pointer Dereference |
Error type description: | A pointer which is invalid is being dereferenced |
File location: | drivers/scsi/sd.c |
Line in file: | 845 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2011-11-07 22:22:22 UTC |
815 set_media_not_present(sdkp); 816 retval = 1; 817 goto out; 818 } 819 820 /* 821 * Using TEST_UNIT_READY enables differentiation between drive with 822 * no cartridge loaded - NOT READY, drive with changed cartridge - 823 * UNIT ATTENTION, or with same cartridge - GOOD STATUS. 824 * 825 * Drives that auto spin down. eg iomega jaz 1G, will be started 826 * by sd_spinup_disk() from sd_revalidate_disk(), which happens whenever 827 * sd_revalidate() is called. 828 */ 829 retval = -ENODEV; 830 831 if (scsi_block_when_processing_errors(sdp)) { 832 sshdr = kzalloc(sizeof(*sshdr), GFP_KERNEL); 833 retval = scsi_test_unit_ready(sdp, SD_TIMEOUT, SD_MAX_RETRIES, 834 sshdr); 835 } 836 837 /* 838 * Unable to test, unit probably not ready. This usually 839 * means there is no disc in the drive. Mark as changed, 840 * and we will figure it out later once the drive is 841 * available again. 842 */ 843 if (retval || (scsi_sense_valid(sshdr) && 844 /* 0x3a is medium not present */ 845 sshdr->asc == 0x3a)) { 846 set_media_not_present(sdkp); 847 retval = 1; 848 goto out; 849 } 850 851 /* 852 * For removable scsi disk we have to recognise the presence 853 * of a disk in the drive. This is kept in the struct scsi_disk 854 * struct and tested at open ! Daniel Roche (dan@lectra.fr) 855 */