]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i40e: properly cleanup on allocation failure in i40e_sync_vsi_filters
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 5 Oct 2016 16:30:38 +0000 (09:30 -0700)
committerDhaval Giani <dhaval.giani@oracle.com>
Wed, 8 Mar 2017 00:40:44 +0000 (19:40 -0500)
commitb2e23d6571899969134db7e13b0a71c2fd438d2e
treed2060c4bcb2e724728f15b87861552bbd3b15230
parente48a60f1686e3a9903dbdc6e04fe27a59589e957
i40e: properly cleanup on allocation failure in i40e_sync_vsi_filters

Orabug: 24568124

Currently, we fail to correctly restore filters on the temporary add
list when we fail to allocate memory either for deletion or addition.
Replace calls to "goto out;" with calls to a new location that correctly
handles memory allocation failures.

Note that it is safe for us to call i40e_undo_filter_entries on the
tmp_del_list even after we've deleted filters because at this point it
will be empty, so we don't need to separate the logic for add and
delete failure.

Change-Id: Iee107fd219c6e03e2fd9645c2debf8e8384a8521
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 4a2ce27bb5f291c38d8e49ef16899828289e4d3d)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_main.c