diff options
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 76b4d14c0b3f..31c9685ebc5a 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1333,6 +1333,12 @@ sd_read_cache_type(struct scsi_disk *sdkp, char *diskname, if (!scsi_status_is_good(res)) goto bad_sense; + if (!data.header_length) { + modepage = 6; + printk(KERN_ERR "%s: missing header in MODE_SENSE response\n", + diskname); + } + /* that went OK, now ask for the proper length */ len = data.length; |