Re: [PATCH] p54: avoid accessing the data mapped to streaming DMA

2020-08-18 Thread Kalle Valo
Jia-Ju Bai wrote: > 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

[PATCH] p54: avoid accessing the data mapped to streaming DMA

2020-08-02 Thread Jia-Ju Bai
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 th