mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
6b995f4eec
In _scif_prog_signal(), the boolean variable 'x100' is used to indicate whether the MIC Coprocessor is X100. If 'x100' is true, the status descriptor will be used to write the value to the destination. Otherwise, a DMA pool will be allocated for this purpose. Specifically, if the DMA pool is allocated successfully, two memory addresses will be returned. One is for the CPU and the other is for the device to access the DMA pool. The former is stored to the variable 'status' and the latter is stored to the variable 'src'. After the allocation, the address in 'src' is saved to 'status->src_dma_addr', which is actually in the DMA pool, and 'src' is then modified. Later on, if an error occurs, the execution flow will transfer to the label 'dma_fail', which will check 'x100' and free up the allocated DMA pool if 'x100' is false. The point here is that 'status->src_dma_addr' is used for freeing up the DMA pool. As mentioned before, 'status->src_dma_addr' is in the DMA pool. And thus, the device is able to modify this data. This can potentially cause failures when freeing up the DMA pool because of the modified device address. This patch avoids the above issue by using the variable 'src' (with necessary calculation) to free up the DMA pool. Signed-off-by: Wenwen Wang <wang6495@umn.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
Makefile | ||
scif_api.c | ||
scif_debugfs.c | ||
scif_dma.c | ||
scif_epd.c | ||
scif_epd.h | ||
scif_fd.c | ||
scif_fence.c | ||
scif_main.c | ||
scif_main.h | ||
scif_map.h | ||
scif_mmap.c | ||
scif_nm.c | ||
scif_nodeqp.c | ||
scif_nodeqp.h | ||
scif_peer_bus.c | ||
scif_peer_bus.h | ||
scif_ports.c | ||
scif_rb.c | ||
scif_rb.h | ||
scif_rma_list.c | ||
scif_rma_list.h | ||
scif_rma.c | ||
scif_rma.h |