Huacai Chen c2e8fbf908 scsi: libsas: align sata_device's rps_resp on a cacheline
The rps_resp buffer in ata_device is a DMA target, but it isn't
explicitly cacheline aligned. Due to this, adjacent fields can be
overwritten with stale data from memory on non-coherent architectures.
As a result, the kernel is sometimes unable to communicate with an SATA
device behind a SAS expander.

Fix this by ensuring that the rps_resp buffer is cacheline aligned.

This issue is similar to that fixed by Commit 84bda12af31f93 ("libata:
align ap->sector_buf") and Commit 4ee34ea3a12396f35b26 ("libata: Align
ata_device's id on a cacheline").

Cc: stable@vger.kernel.org
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-11-21 23:06:32 -05:00
..
2012-02-19 08:08:58 -06:00
2016-01-27 20:36:10 +08:00
2017-05-04 12:19:44 -07:00
2016-02-23 21:27:02 -05:00
2017-11-14 16:23:44 -08:00
2017-02-21 11:51:42 -08:00
2015-05-18 13:35:56 -04:00