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

!8561 mlxsw: spectrum_acl_tcam: Fix possible use-after-free during activity update

parents 6e2a5b5e 01d08696
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1198,8 +1198,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