dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/radeon: Using unsigned long instead of unsigned to fix possible overflow
@ 2022-11-04  9:50 Hanjun Guo
  2022-11-04  9:50 ` [PATCH 2/2] drm/radeon: Add the missed acpi_put_table() to fix memory leak Hanjun Guo
  2022-11-04 18:31 ` [PATCH 1/2] drm/radeon: Using unsigned long instead of unsigned to fix possible overflow Alex Deucher
  0 siblings, 2 replies; 5+ messages in thread
From: Hanjun Guo @ 2022-11-04  9:50 UTC (permalink / raw)
  To: amd-gfx, dri-devel; +Cc: Alex Deucher, Hanjun Guo

VBIOSImageOffset in struct UEFI_ACPI_VFCT is ULONG (unsigned long),
but it will be assigned to "unsigned offset", so use unsigned long
instead of unsigned for the offset, to avoid possible overflow.

Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
---
 drivers/gpu/drm/radeon/radeon_bios.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_bios.c b/drivers/gpu/drm/radeon/radeon_bios.c
index 3312165..520d1d6 100644
--- a/drivers/gpu/drm/radeon/radeon_bios.c
+++ b/drivers/gpu/drm/radeon/radeon_bios.c
@@ -611,7 +611,7 @@ static bool radeon_acpi_vfct_bios(struct radeon_device *rdev)
 	struct acpi_table_header *hdr;
 	acpi_size tbl_size;
 	UEFI_ACPI_VFCT *vfct;
-	unsigned offset;
+	unsigned long offset;
 
 	if (!ACPI_SUCCESS(acpi_get_table("VFCT", 1, &hdr)))
 		return false;
-- 
1.7.12.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-08 15:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04  9:50 [PATCH 1/2] drm/radeon: Using unsigned long instead of unsigned to fix possible overflow Hanjun Guo
2022-11-04  9:50 ` [PATCH 2/2] drm/radeon: Add the missed acpi_put_table() to fix memory leak Hanjun Guo
2022-11-08 15:36   ` Alex Deucher
2022-11-04 18:31 ` [PATCH 1/2] drm/radeon: Using unsigned long instead of unsigned to fix possible overflow Alex Deucher
2022-11-07  1:41   ` Hanjun Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).