[PATCH AUTOSEL 6.6 41/75] accel/habanalabs: increase HL_MAX_STR to 64 bytes to avoid warnings
Sasha Levin
sashal at kernel.org
Fri Mar 29 12:42:22 UTC 2024
From: Koby Elbaz <kelbaz at habana.ai>
[ Upstream commit 8c075401f2dbda43600c61f780a165abde77877a ]
Fix a warning of a buffer overflow:
‘snprintf’ output between 38 and 47 bytes into a destination of size 32
Signed-off-by: Koby Elbaz <kelbaz at habana.ai>
Reviewed-by: Oded Gabbay <ogabbay at kernel.org>
Signed-off-by: Oded Gabbay <ogabbay at kernel.org>
Signed-off-by: Sasha Levin <sashal at kernel.org>
---
drivers/accel/habanalabs/common/habanalabs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/accel/habanalabs/common/habanalabs.h b/drivers/accel/habanalabs/common/habanalabs.h
index 05febd5b14e9c..179e5e7013a12 100644
--- a/drivers/accel/habanalabs/common/habanalabs.h
+++ b/drivers/accel/habanalabs/common/habanalabs.h
@@ -2508,7 +2508,7 @@ struct hl_state_dump_specs {
* DEVICES
*/
-#define HL_STR_MAX 32
+#define HL_STR_MAX 64
#define HL_DEV_STS_MAX (HL_DEVICE_STATUS_LAST + 1)
--
2.43.0
More information about the dri-devel
mailing list