代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/rdma-core 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From c4a5ac8bba611206e062c0955fb605bfc0f48b0f Mon Sep 17 00:00:00 2001
From: Mark Zhang <markzhang@nvidia.com>
Date: Fri, 26 Apr 2024 14:17:55 +0300
Subject: [PATCH] librdmacm: Fix an overflow bug in qsort comparison function
Reference: https://github.com/linux-rdma/rdma-core/commit/c4a5ac8bba611206e062c0955fb605bfc0f48b0f
The comparison function dev_cmp() doesn't work with 64b pointers in some
cases, as it casts the pointer to int. For example it's not able to sort
this list:
{0xfffe0c2f0b00, 0xaaac741b4a90, 0xaaac741b4d70}
Fixes: e5d371cb0af0 ("librdmacm: Globally store and sort IB device list")
Signed-off-by: Mark Zhang <markzhang@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
---
librdmacm/cma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/librdmacm/cma.c b/librdmacm/cma.c
index 7b924bd..0a631bd 100644
--- a/librdmacm/cma.c
+++ b/librdmacm/cma.c
@@ -311,7 +311,7 @@ static void remove_cma_dev(struct cma_device *cma_dev)
static int dev_cmp(const void *a, const void *b)
{
- return (int)(*(char *const *)a - *(char *const *)b);
+ return (*(uintptr_t *)a > *(uintptr_t *)b) - (*(uintptr_t *)a < *(uintptr_t *)b);
}
static int sync_devices_list(void)
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。