Don't allocate DMA buffers in user space. Only use kernel-allocated, DMA-safe memory for PCIe DMA. User space can access the data after the transfer, but not as the primary buffer.