Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 212ada90 authored by Chuhong Yuan's avatar Chuhong Yuan Committed by Greg Kroah-Hartman
Browse files

net/mlx4_core: Add missed mlx4_free_cmd_mailbox()



[ Upstream commit 8eb65fda4a6dbd59cd5de24b106a10b6ee0d2176 ]

mlx4_do_mirror_rule() forgets to call mlx4_free_cmd_mailbox() to
free the memory region allocated by mlx4_alloc_cmd_mailbox() before
an exit.
Add the missed call to fix it.

Fixes: 78efed27 ("net/mlx4_core: Support mirroring VF DMFS rules on both ports")
Signed-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
Reviewed-by: default avatarTariq Toukan <tariqt@nvidia.com>
Link: https://lore.kernel.org/r/20210221143559.390277-1-hslester96@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6c18d591
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4990,6 +4990,7 @@ static int mlx4_do_mirror_rule(struct mlx4_dev *dev, struct res_fs_rule *fs_rule

	if (!fs_rule->mirr_mbox) {
		mlx4_err(dev, "rule mirroring mailbox is null\n");
		mlx4_free_cmd_mailbox(dev, mailbox);
		return -EINVAL;
	}
	memcpy(mailbox->buf, fs_rule->mirr_mbox, fs_rule->mirr_mbox_size);