2020-08-02 14:28:40

by Jia-Ju Bai

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

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