aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2.h
diff options
context:
space:
mode:
authorJianglei Nie <niejianglei2021@163.com>2022-09-30 14:28:43 +0800
committerDavid S. Miller <davem@davemloft.net>2022-10-03 12:41:07 +0100
commitb43f9acbb8942b05252be83ac25a81cec70cc192 (patch)
treec0b5665dc5e96ac6fcc6ed7a9ee835b7d141c1e5 /drivers/net/ethernet/broadcom/bnx2.h
parenteth: lan743x: reject extts for non-pci11x1x devices (diff)
downloadlinux-dev-b43f9acbb8942b05252be83ac25a81cec70cc192.tar.xz
linux-dev-b43f9acbb8942b05252be83ac25a81cec70cc192.zip
bnx2x: fix potential memory leak in bnx2x_tpa_stop()
bnx2x_tpa_stop() allocates a memory chunk from new_data with bnx2x_frag_alloc(). The new_data should be freed when gets some error. But when "pad + len > fp->rx_buf_size" is true, bnx2x_tpa_stop() returns without releasing the new_data, which will lead to a memory leak. We should free the new_data with bnx2x_frag_free() when "pad + len > fp->rx_buf_size" is true. Fixes: 07b0f00964def8af9321cfd6c4a7e84f6362f728 ("bnx2x: fix possible panic under memory stress") Signed-off-by: Jianglei Nie <niejianglei2021@163.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2.h')
0 files changed, 0 insertions, 0 deletions