From: Tejun Heo Date: Mon, 2 Mar 2009 09:55:16 +0000 (+0900) Subject: libata: don't use on-stack sense buffer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b53570814692db79c3525523b6e9ec9874416c04;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Reported-by: Chuck Ebbert Signed-off-by: Jeff Garzik --- 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) 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;