]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
ice: Cleanup fltr list in case of allocation issues
authorRobert Malz <robertx.malz@intel.com>
Fri, 26 Feb 2021 21:19:32 +0000 (13:19 -0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 May 2021 07:53:23 +0000 (09:53 +0200)
commit6863bea695a50eea42548b9d6a00e106db948011
tree73475dafb997a0cf3e2d75695049960d18b2d2a7
parent32bf9b39c8dcd3b4b98940aad8d05e8eecb9fe75
ice: Cleanup fltr list in case of allocation issues

BugLink: https://bugs.launchpad.net/bugs/1926368
commit b7eeb52721fe417730fc5adc5cbeeb5fe349ab26 upstream.

When ice_remove_vsi_lkup_fltr is called, by calling
ice_add_to_vsi_fltr_list local copy of vsi filter list
is created. If any issues during creation of vsi filter
list occurs it up for the caller to free already
allocated memory. This patch ensures proper memory
deallocation in these cases.

Fixes: 80d144c9ac82 ("ice: Refactor switch rule management structures and functions")
Signed-off-by: Robert Malz <robertx.malz@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/intel/ice/ice_switch.c