[SCSI] aic79xx: fix sense_buffer access bug
authorFUJITA Tomonori <tomof@acm.org>
Sun, 27 Jan 2008 03:41:09 +0000 (12:41 +0900)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Wed, 30 Jan 2008 19:03:39 +0000 (13:03 -0600)
The commit de25deb18016f66dcdede165d07654559bb332bc changed
scsi_cmnd.sense_buffer from a static array to a dynamically allocated
buffer. We can't access to sense_buffer in '&cmd->sense_buffer' way.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/aic7xxx/aic79xx_osm.c

index 0e4708fd43c8e00d861b80392c976683d43145fa..3c4efa4ae543bb178f40566c7a03d4f1e6b81ea3 100644 (file)
@@ -1922,7 +1922,7 @@ ahd_linux_queue_cmd_complete(struct ahd_softc *ahd, struct scsi_cmnd *cmd)
                                struct scsi_sense_data *sense;
                                
                                sense = (struct scsi_sense_data *)
-                                       &cmd->sense_buffer;
+                                       cmd->sense_buffer;
                                if (sense->extra_len >= 5 &&
                                    (sense->add_sense_code == 0x47
                                     || sense->add_sense_code == 0x48))