From d5be3dd31cb9a16b755de6fb651976d9dce23da8 Mon Sep 17 00:00:00 2001 From: Ketan Patil Date: Sat, 26 Nov 2022 13:13:03 +0000 Subject: [PATCH] nvmap: Fix type casting issue CERT-C is reporting following issue: - Casting entry->sci_ipc_id from unsigned long long to unsigned int without checking its value may result in lost or misinterpreted data. Fix this by changing the data type of sid to u64. CID 587909 Bug 3745813 Change-Id: I899db1feff8b6f9b175f4a93cab068a3d7a0c88f Signed-off-by: Ketan Patil Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2816557 Reviewed-by: svcacv Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-cert Reviewed-by: svc_kernel_abi Reviewed-by: Sachin Nikam GVS: Gerrit_Virtual_Submit --- drivers/video/tegra/nvmap/nvmap_sci_ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/tegra/nvmap/nvmap_sci_ipc.c b/drivers/video/tegra/nvmap/nvmap_sci_ipc.c index 38fa0001..9cb59df1 100644 --- a/drivers/video/tegra/nvmap/nvmap_sci_ipc.c +++ b/drivers/video/tegra/nvmap/nvmap_sci_ipc.c @@ -38,7 +38,7 @@ struct nvmap_sci_ipc { struct free_sid_node { struct list_head list; - u32 sid; + u64 sid; }; /* An rb-tree root node for holding sci_ipc_id of clients */