aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-03-02 04:55:16 -0500
committerJeff Garzik <jgarzik@redhat.com>2009-03-05 07:25:10 -0500
commitb53570814692db79c3525523b6e9ec9874416c04 (patch)
tree854cfbcb231bb0914be2b0de9ea73dbf5cc07e6b /drivers/ata
parent84bda12af31f930e4200c5244aa111de2485d7b0 (diff)
libata: don't use on-stack sense buffer
sense_buffer is used as DMA target and shouldn't be allocated on stack. Use ap->sector_buf instead. This problem is spotted by Chuck Ebbert. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Chuck Ebbert <cebbert@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-eh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index ce2ef0475339..009ccc7c9865 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2901,7 +2901,7 @@ static int atapi_eh_clear_ua(struct ata_device *dev)
2901 int i; 2901 int i;
2902 2902
2903 for (i = 0; i < ATA_EH_UA_TRIES; i++) { 2903 for (i = 0; i < ATA_EH_UA_TRIES; i++) {
2904 u8 sense_buffer[SCSI_SENSE_BUFFERSIZE]; 2904 u8 *sense_buffer = dev->link->ap->sector_buf;
2905 u8 sense_key = 0; 2905 u8 sense_key = 0;
2906 unsigned int err_mask; 2906 unsigned int err_mask;
2907 2907