diff options
author | Jia-Ju Bai <baijiaju@tsinghua.edu.cn> | 2020-08-02 11:16:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-04 00:50:48 +0200 |
commit | a45a9e8a768c32103ffec67f9b173968a6154a11 (patch) | |
tree | 2a7ce1800b8c274c0426c5717b99756825054518 /fs/binfmt_em86.c | |
parent | net: phy: mdio-mvusb: select MDIO_DEVRES in Kconfig (diff) | |
download | linux-a45a9e8a768c32103ffec67f9b173968a6154a11.tar.xz linux-a45a9e8a768c32103ffec67f9b173968a6154a11.zip |
atm: eni: avoid accessing the data mapped to streaming DMA
In do_tx(), skb->data is mapped to streaming DMA on line 1111:
paddr = dma_map_single(...,skb->data,DMA_TO_DEVICE);
Then skb->data is accessed on line 1153:
(skb->data[3] & 0xf)
This access may cause data inconsistency between CPU cache and hardware.
To fix this problem, skb->data[3] is assigned to a local variable before
DMA mapping, and then the driver accesses this local variable instead of
skb->data[3].
Signed-off-by: Jia-Ju Bai <baijiaju@tsinghua.edu.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/binfmt_em86.c')
0 files changed, 0 insertions, 0 deletions