wifi: brcmfmac: fix potential memory leak in brcmf_netdev_start_xmit()
stable inclusion from stable-v5.10.173 commit e08e6812efb6a8c676e733de0518594d1517e0d9 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8BFR3 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e08e6812efb6a8c676e733de0518594d1517e0d9 -------------------------------- [ Upstream commit 212fde3f ] The brcmf_netdev_start_xmit() returns NETDEV_TX_OK without freeing skb in case of pskb_expand_head() fails, add dev_kfree_skb() to fix it. Compile tested only. Fixes: 270a6c1f ("brcmfmac: rework headroom check in .start_xmit()") Signed-off-by:Zhang Changzhong <zhangchangzhong@huawei.com> Reviewed-by:
Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by:
Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/1668684782-47422-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment