
From: Huangjunhua <huangjunhua14@huawei.com> driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICUK85 CVE: NA Fix soft lockup during large file transfers over veth interfaces in Taishan 500(Model 2280) environments by adding a readl operation prior to DMA initiation. This guarantees proper synchronization of Send Queue buffer descriptors, preventing descriptor corruption that caused system hangs. Signed-off-by: Huangjunhua <huangjunhua14@huawei.com> --- drivers/net/ethernet/huawei/bma/edma_drv/edma_queue.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/huawei/bma/edma_drv/edma_queue.c b/drivers/net/ethernet/huawei/bma/edma_drv/edma_queue.c index 678262f7412c..94e63d3ee9dd 100644 --- a/drivers/net/ethernet/huawei/bma/edma_drv/edma_queue.c +++ b/drivers/net/ethernet/huawei/bma/edma_drv/edma_queue.c @@ -406,6 +406,12 @@ static s32 submit_dma_queue_sq(u32 dir, struct bspveth_dmal pdmalbase_v, u32 pf) BMA_LOG(DLOG_DEBUG, "submit dma queue sq, sq_tail change %d,\n", sq_tail); wmb(); /* memory barriers. */ + /* readl last u32 of sq buffer descriptor to confirm the sq buffer descriptor + * write to local sq + */ + (void)readl((void __iomem *)(p_dma_sq + sq_tail + sizeof(struct dma_ch_sq_s) + - sizeof(u32))); + (void)set_dma_queue_sq_tail(sq_tail); return 0; -- 2.33.0