[PATCH 2/5] vdpa/nfp: fix integer handling issues
Chaoyong He
chaoyong.he at corigine.com
Wed Nov 15 04:23:07 CET 2023
CI found integer handling issues, overflow before widen.
Coverity issue: 405352
Fixes: 76ea5ebef08e ("vdpa/nfp: add notify related logic")
Cc: stable at dpdk.org
Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Long Wu <long.wu at corigine.com>
Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
---
drivers/vdpa/nfp/nfp_vdpa_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vdpa/nfp/nfp_vdpa_core.c b/drivers/vdpa/nfp/nfp_vdpa_core.c
index e2a6253ae5..7b877605e4 100644
--- a/drivers/vdpa/nfp/nfp_vdpa_core.c
+++ b/drivers/vdpa/nfp/nfp_vdpa_core.c
@@ -176,7 +176,7 @@ uint64_t
nfp_vdpa_get_queue_notify_offset(struct nfp_vdpa_hw *vdpa_hw __rte_unused,
int qid)
{
- return NFP_VDPA_NOTIFY_ADDR_BASE + (qid * NFP_VDPA_NOTIFY_ADDR_INTERVAL);
+ return NFP_VDPA_NOTIFY_ADDR_BASE + ((uint64_t)qid * NFP_VDPA_NOTIFY_ADDR_INTERVAL);
}
/*
--
2.39.1
More information about the stable
mailing list