From: jsg Date: Mon, 9 Sep 2024 08:42:39 +0000 (+0000) Subject: drm/amdgpu: avoid reading vf2pf info size from FB X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e361f482e8de51ae3d45c86611b29785edbcc5a1;p=openbsd drm/amdgpu: avoid reading vf2pf info size from FB From Zhigang Luo 30e60db4296c75f0d7a09c9beedcdab2e044cc2c in linux-6.6.y/6.6.50 3bcc0ee14768d886cedff65da72d83d375a31a56 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c index 2be313e5f4b..abc7bdc149e 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c @@ -616,7 +616,7 @@ static int amdgpu_virt_write_vf2pf_data(struct amdgpu_device *adev) vf2pf_info->dummy_page_addr = (uint64_t)adev->dummy_page_addr; vf2pf_info->checksum = amd_sriov_msg_checksum( - vf2pf_info, vf2pf_info->header.size, 0, 0); + vf2pf_info, sizeof(*vf2pf_info), 0, 0); return 0; }