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

2020-08-03 Thread David Miller
From: Jia-Ju Bai Date: Sun, 2 Aug 2020 17:16:11 +0800 > In do_tx(), skb->data is mapped to streaming DMA on line : > 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 bet

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

2020-08-02 Thread Jia-Ju Bai
In do_tx(), skb->data is mapped to streaming DMA on line : 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 assi