diff options
author | Tejun Heo <tj@kernel.org> | 2009-03-02 09:55:16 (GMT) |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-03-05 12:25:10 (GMT) |
commit | b53570814692db79c3525523b6e9ec9874416c04 (patch) | |
tree | 854cfbcb231bb0914be2b0de9ea73dbf5cc07e6b /drivers/ata/libata-eh.c | |
parent | 84bda12af31f930e4200c5244aa111de2485d7b0 (diff) | |
download | linux-fsl-qoriq-b53570814692db79c3525523b6e9ec9874416c04.tar.xz |
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 ce2ef04..009ccc7 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; |