mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
In p54p_tx(), skb->data is mapped to streaming DMA on line 337: mapping = pci_map_single(..., skb->data, ...); Then skb->data is accessed on line 349: desc->device_addr = ((struct p54_hdr *)skb->data)->req_id; This access may cause data inconsistency between CPU cache and hardware. To fix this problem, ((struct p54_hdr *)skb->data)->req_id is stored in a local variable before DMA mapping, and then the driver accesses this local variable instead of skb->data. Cc: <stable@vger.kernel.org> Signed-off-by: Jia-Ju Bai <baijiaju@tsinghua.edu.cn> Acked-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200802132949.26788-1-baijiaju@tsinghua.edu.cn |
||
|---|---|---|
| .. | ||
| eeprom.c | ||
| eeprom.h | ||
| fwio.c | ||
| Kconfig | ||
| led.c | ||
| lmac.h | ||
| main.c | ||
| Makefile | ||
| p54.h | ||
| p54pci.c | ||
| p54pci.h | ||
| p54spi_eeprom.h | ||
| p54spi.c | ||
| p54spi.h | ||
| p54usb.c | ||
| p54usb.h | ||
| txrx.c | ||