diff options
author | Tejun Heo <tj@kernel.org> | 2009-03-02 18:55:16 +0900 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-03-05 07:25:10 -0500 |
commit | b53570814692db79c3525523b6e9ec9874416c04 (patch) | |
tree | 854cfbcb231bb0914be2b0de9ea73dbf5cc07e6b /drivers/ata/libata-eh.c | |
parent | 84bda12af31f930e4200c5244aa111de2485d7b0 (diff) | |
download | linux-3.10-b53570814692db79c3525523b6e9ec9874416c04.tar.gz linux-3.10-b53570814692db79c3525523b6e9ec9874416c04.tar.bz2 linux-3.10-b53570814692db79c3525523b6e9ec9874416c04.zip |
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/libata-eh.c')
-rw-r--r-- | drivers/ata/libata-eh.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index ce2ef047533..009ccc7c986 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) int i; for (i = 0; i < ATA_EH_UA_TRIES; i++) { - u8 sense_buffer[SCSI_SENSE_BUFFERSIZE]; + u8 *sense_buffer = dev->link->ap->sector_buf; u8 sense_key = 0; unsigned int err_mask; |