summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ff0da7b)
raw | patch | inline | side by side (parent: ff0da7b)
author | Christian König <christian.koenig@amd.com> | |
Wed, 28 Feb 2018 14:39:46 +0000 (15:39 +0100) | ||
committer | Christian König <christian.koenig@amd.com> | |
Wed, 28 Feb 2018 19:04:32 +0000 (20:04 +0100) |
The range is stored as exclusive, not inclusive. Subtracts one to get
the inclusive interval for the calculation. This fixes crashes when 32bit
addresses are in use.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
the inclusive interval for the calculation. This fixes crashes when 32bit
addresses are in use.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
amdgpu/amdgpu_device.c | patch | blob | history |
diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c
index 9ff6ad1627583705863715549e2f492175408e15..fb2cfb57c1d746379f4b215889164b715c1bf7ae 100644 (file)
--- a/amdgpu/amdgpu_device.c
+++ b/amdgpu/amdgpu_device.c
switch (info) {
case amdgpu_sw_info_address32_hi:
if (dev->vamgr_high_32.va_max)
- *val32 = dev->vamgr_high_32.va_max >> 32;
+ *val32 = (dev->vamgr_high_32.va_max - 1) >> 32;
else
- *val32 = dev->vamgr_32.va_max >> 32;
+ *val32 = (dev->vamgr_32.va_max - 1) >> 32;
return 0;
}
return -EINVAL;