summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/aquantia/atlantic
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju@tsinghua.edu.cn>2020-08-02 12:33:40 +0300
committerDavid S. Miller <davem@davemloft.net>2020-08-04 01:51:25 +0300
commitcbbb64f62acd97429f517bd382ada9d618c8856a (patch)
treeafcf227c8d3f9acc858c0b1fad42981d72057e05 /drivers/net/ethernet/aquantia/atlantic
parenta45a9e8a768c32103ffec67f9b173968a6154a11 (diff)
downloadlinux-cbbb64f62acd97429f517bd382ada9d618c8856a.tar.xz
atm: idt77252: avoid accessing the data mapped to streaming DMA
In queue_skb(), skb->data is mapped to streaming DMA on line 850: dma_map_single(..., skb->data, ...); Then skb->data is accessed on lines 862 and 863: tbd->word_4 = (skb->data[0] << 24) | (skb->data[1] << 16) | (skb->data[2] << 8) | (skb->data[3] << 0); and on lines 893 and 894: tbd->word_4 = (skb->data[0] << 24) | (skb->data[1] << 16) | (skb->data[2] << 8) | (skb->data[3] << 0); These accesses may cause data inconsistency between CPU cache and hardware. To fix this problem, the calculation result of skb->data is stored in a local variable before DMA mapping, and then the driver accesses this local variable instead of skb->data. Signed-off-by: Jia-Ju Bai <baijiaju@tsinghua.edu.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aquantia/atlantic')
0 files changed, 0 insertions, 0 deletions