[PATCH 1/2] drm/amdgpu/pptable: Fix __counted_by attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The attribute is not helpful if commented out.

Cc: Tasos Sahanidis <tasos@xxxxxxxxxxxx>
Fixes: c6c4dd540125 ("drm/amdgpu/pptable: Fix UBSAN array-index-out-of-bounds")
Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
---
 drivers/gpu/drm/amd/include/pptable.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/include/pptable.h b/drivers/gpu/drm/amd/include/pptable.h
index f83ace2d7ec3..984770d0eb4c 100644
--- a/drivers/gpu/drm/amd/include/pptable.h
+++ b/drivers/gpu/drm/amd/include/pptable.h
@@ -480,7 +480,7 @@ typedef struct _StateArray{
 	//how many states we have
 	UCHAR ucNumEntries;
 
-	ATOM_PPLIB_STATE_V2 states[] /* __counted_by(ucNumEntries) */;
+	ATOM_PPLIB_STATE_V2 states[] __counted_by(ucNumEntries);
 }StateArray;
 
 
-- 
2.43.0




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux