[Intel-wired-lan] [PATCH] ice: Fix memleak in ice_set_ringparam
Brown, Aaron F
aaron.f.brown at intel.com
Sat Sep 5 02:52:23 UTC 2020
> From: Dinghao Liu <dinghao.liu at zju.edu.cn>
> Sent: Wednesday, August 26, 2020 7:34 PM
> To: dinghao.liu at zju.edu.cn; kjlu at umn.edu
> Cc: Kirsher, Jeffrey T <jeffrey.t.kirsher at intel.com>; David S. Miller
> <davem at davemloft.net>; Jakub Kicinski <kuba at kernel.org>; Alexei
> Starovoitov <ast at kernel.org>; Daniel Borkmann <daniel at iogearbox.net>;
> Jesper Dangaard Brouer <hawk at kernel.org>; John Fastabend
> <john.fastabend at gmail.com>; intel-wired-lan at lists.osuosl.org;
> netdev at vger.kernel.org; linux-kernel at vger.kernel.org;
> bpf at 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 <dinghao.liu at zju.edu.cn>
> ---
> drivers/net/ethernet/intel/ice/ice_ethtool.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
Tested-by: Aaron Brown <aaron.f.brown at intel.com>
More information about the Intel-wired-lan
mailing list