Loading
net/qla3xxx: fix potential memleak in ql_alloc_buffer_queues
stable inclusion from stable-v5.10.208 commit 0fc5fe6e4134544c5135592286d96ae22e0c7692 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9T22K Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0fc5fe6e4134544c5135592286d96ae22e0c7692 -------------------------------- [ Upstream commit 89f45c30172c80e55c887f32f1af8e184124577b ] When dma_alloc_coherent() fails, we should free qdev->lrg_buf to prevent potential memleak. Fixes: 1357bfcf ("qla3xxx: Dynamically size the rx buffer queue based on the MTU.") Signed-off-by:Dinghao Liu <dinghao.liu@zju.edu.cn> Link: https://lore.kernel.org/r/20231227070227.10527-1-dinghao.liu@zju.edu.cn Signed-off-by:
Jakub Kicinski <kuba@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng1 <sanglipeng1@jd.com>