Unverified Commit 8ade6cc7 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!8627 [sync] PR-8561: mlxsw: spectrum_acl_tcam: Fix possible use-after-free during activity update

parents 4d023d47 454d293b
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1187,8 +1187,14 @@ mlxsw_sp_acl_tcam_ventry_activity_get(struct mlxsw_sp *mlxsw_sp,
				      struct mlxsw_sp_acl_tcam_ventry *ventry,
				      bool *activity)
{
	return mlxsw_sp_acl_tcam_entry_activity_get(mlxsw_sp,
						    ventry->entry, activity);
	struct mlxsw_sp_acl_tcam_vregion *vregion = ventry->vchunk->vregion;
	int err;

	mutex_lock(&vregion->lock);
	err = mlxsw_sp_acl_tcam_entry_activity_get(mlxsw_sp, ventry->entry,
						   activity);
	mutex_unlock(&vregion->lock);
	return err;
}

static int