mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
net/mlx4_core: Fix memory leak while delete slave's resources
[ Upstream commit461d5f1b59] 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:78efed2751('net/mlx4_core: Support mirroring VF DMFS rules on both ports') Signed-off-by: Moshe Shemesh <moshe@mellanox.com> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1cb81756b7
commit
3d392d2e3e
@@ -5048,6 +5048,7 @@ static void rem_slave_fs_rule(struct mlx4_dev *dev, int slave)
|
||||
&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;
|
||||
|
||||
Reference in New Issue
Block a user