[BUG] net: rocker: accessing the data mapped to streaming DMA

From: Jia-Ju Bai
Date: Sun Aug 02 2020 - 10:30:37 EST


In rocker_dma_test_offset(), "buf" is mapped to streaming DMA on line 203:
 dma_handle = pci_map_single(..., buf, ...);

Then, "buf" is accessed on line 229:
 expect[i] = ~buf[i];

This access may cause data inconsistency between CPU cache and hardware.

I am not sure how to properly fix this problem, and thus I only report it.


Best wishes,
Jia-Ju Bai