Skip to contentSkip to conversation

Patch "net/mlx4_core: Fix memory leak while delete slave's resources" has been added to the 4.15-stable tree

PATCH [email protected] 1 participant 1 message Apr 10, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

net/mlx4_core: Fix memory leak while delete slave's resources

to the 4.15-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:
net-mlx4_core-fix-memory-leak-while-delete-slave-s-resources.patch
and it can be found in the queue-4.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Tue Apr 10 23:19:36 CEST 2018

From: Moshe Shemesh <[email protected]>
Date: Tue, 27 Mar 2018 14:41:19 +0300
Subject: net/mlx4_core: Fix memory leak while delete slave's resources

From: Moshe Shemesh <[email protected]>

[ Upstream commit 461d5f1b59490ce0096dfda45e10038c122a7892 ]

mlx4_delete_all_resources_for_slave in resource tracker should free all memory allocated for a slave.
While releasing memory of fs_rule, it misses releasing memory of fs_rule->mirr_mbox.

Fixes 78efed275117 ('net/mlx4_core: Support mirroring VF DMFS rules on both ports')
---
 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c |    1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +1 -0
@@ -5088,6 +5088,7 @@ static void rem_slave_fs_rule(struct mlx
 						 &tracker->res_tree[RES_FS_RULE]);
 					list_del(&fs_rule->com.list);
 					spin_unlock_irq(mlx4_tlock(dev));
+					kfree(fs_rule->mirr_mbox);
 					kfree(fs_rule);
 					state = 0;
 					break;

Patches currently in stable-queue which might be from [email protected] are

queue-4.15/net-mlx4_core-fix-memory-leak-while-delete-slave-s-resources.patch queue-4.15/net-mlx5e-verify-coalescing-parameters-in-range.patch