Patch "i40e: Fix memory leak in i40e_probe" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    i40e: Fix memory leak in i40e_probe

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     i40e-fix-memory-leak-in-i40e_probe.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit fd9078303b2057f64668b51ede778aa2241fbde4
Author: Keita Suzuki <keitasuzuki.park@xxxxxxxxxxxxxxxxxxxx>
Date:   Fri Oct 30 07:14:30 2020 +0000

    i40e: Fix memory leak in i40e_probe
    
    [ Upstream commit 58cab46c622d6324e47bd1c533693c94498e4172 ]
    
    Struct i40e_veb is allocated in function i40e_setup_pf_switch, and
    stored to an array field veb inside struct i40e_pf. However when
    i40e_setup_misc_vector fails, this memory leaks.
    
    Fix this by calling exit and teardown functions.
    
    Signed-off-by: Keita Suzuki <keitasuzuki.park@xxxxxxxxxxxxxxxxxxxx>
    Tested-by: Tony Brelinski <tonyx.brelinski@xxxxxxxxx>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index fe9da568ee19..1591f81d8ae3 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -13956,6 +13956,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		if (err) {
 			dev_info(&pdev->dev,
 				 "setup of misc vector failed: %d\n", err);
+			i40e_cloud_filter_exit(pf);
+			i40e_fdir_teardown(pf);
 			goto err_vsis;
 		}
 	}



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux