Thread (2 messages) 2 messages, 2 authors, 2020-09-05

RE: [PATCH] ice: Fix memleak in ice_set_ringparam

From: Brown, Aaron F <hidden>
Date: 2020-09-05 02:52:33
Also in: bpf, intel-wired-lan, lkml

From: Dinghao Liu <redacted>
Sent: Wednesday, August 26, 2020 7:34 PM
To: dinghao.liu@zju.edu.cn; kjlu@umn.edu
Cc: Kirsher, Jeffrey T <redacted>; David S. Miller
[off-list ref]; Jakub Kicinski [off-list ref]; Alexei
Starovoitov [off-list ref]; Daniel Borkmann [off-list ref];
Jesper Dangaard Brouer [off-list ref]; John Fastabend
[off-list ref]; intel-wired-lan@lists.osuosl.org;
netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
bpf@vger.kernel.org
Subject: [PATCH] ice: Fix memleak in ice_set_ringparam

When kcalloc() on rx_rings fails, we should free tx_rings
and xdp_rings to prevent memleak. Similarly, when
ice_alloc_rx_bufs() fails, we should free xdp_rings.

Signed-off-by: Dinghao Liu <redacted>
---
 drivers/net/ethernet/intel/ice/ice_ethtool.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
Tested-by: Aaron Brown <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help