Skip to content

Commit

Permalink
net/mlx5: SF: Fix memory leak of work item
Browse files Browse the repository at this point in the history
Cited patch in the fixes tag missed to free the allocated work.
Fix it by freeing the work after work execution.

Fixes: f3196bb ("net/mlx5: Introduce vhca state event notifier")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
  • Loading branch information
Shay Drory authored and Saeed Mahameed committed Mar 10, 2021
1 parent 6a37175 commit 6fa37d6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/sf/vhca_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ static void mlx5_vhca_state_work_handler(struct work_struct *_work)
struct mlx5_core_dev *dev = notifier->dev;

mlx5_vhca_event_notify(dev, &work->event);
kfree(work);
}

static int
Expand Down

0 comments on commit 6fa37d6

Please sign in to comment.