sfc: fix potential memleak in __ef100_hard_start_xmit()
stable inclusion from stable-v5.10.157 commit 8e2664e12bc6fa8d2aa642a7027d6a5c2810a674 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7MU59 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8e2664e12bc6fa8d2aa642a7027d6a5c2810a674 -------------------------------- [ Upstream commit aad98abd ] The __ef100_hard_start_xmit() returns NETDEV_TX_OK without freeing skb in error handling case, add dev_kfree_skb_any() to fix it. Fixes: 51b35a45 ("sfc: skeleton EF100 PF driver") Signed-off-by: NZhang Changzhong <zhangchangzhong@huawei.com> Acked-by: NMartin Habets <habetsm.xilinx@gmail.com> Reviewed-by: NLeon Romanovsky <leonro@nvidia.com> Link: https://lore.kernel.org/r/1668671409-10909-1-git-send-email-zhangchangzhong@huawei.comSigned-off-by: NPaolo Abeni <pabeni@redhat.com> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: Nsanglipeng <sanglipeng1@jd.com>
Showing
想要评论请 注册 或 登录