Blame SOURCES/0001-ibacm-acm.c-load-plugin-while-it-is-soft-link.patch

3bcb62
From 91b414f645b0fdca914151280bb14a12258a56e7 Mon Sep 17 00:00:00 2001
3bcb62
From: Honggang Li <honli@redhat.com>
3bcb62
Date: Wed, 13 Jan 2021 11:51:04 +0800
3bcb62
Subject: [PATCH] ibacm: acm.c load plugin while it is soft link
3bcb62
3bcb62
NOTE: THIS ONE IS RHEL SPECIFIC WORKAROUND COMMIT.
3bcb62
https://github.com/linux-rdma/rdma-core/pull/923
3bcb62
3bcb62
Because of commit ad5d934d688911149d795aee1d3b9fa06bf171a9,
3bcb62
the provider libdsap.so.1.0.0 was not opened/used for address resolution
3bcb62
for OPA device.
3bcb62
3bcb62
As discussed in this closed PR:
3bcb62
https://github.com/linux-rdma/rdma-core/pull/848
3bcb62
3bcb62
I create a soft link for libdsap.so => libdsap.so.1.0.0 . The soft link
3bcb62
was ignored because it is a not regular file.
3bcb62
3bcb62
Signed-off-by: Honggang Li <honli@redhat.com>
3bcb62
---
3bcb62
 ibacm/src/acm.c | 2 +-
3bcb62
 1 file changed, 1 insertion(+), 1 deletion(-)
3bcb62
3bcb62
diff --git a/ibacm/src/acm.c b/ibacm/src/acm.c
3bcb62
index f1c8a2fabfb4..77ffda316b0c 100644
3bcb62
--- a/ibacm/src/acm.c
3bcb62
+++ b/ibacm/src/acm.c
3bcb62
@@ -2878,7 +2878,7 @@ static int acm_open_providers(void)
3bcb62
 			acm_log(0, "Error - could not stat: %s\n", file_name);
3bcb62
 			continue;
3bcb62
 		}
3bcb62
-		if (!S_ISREG(buf.st_mode))
3bcb62
+		if (!(S_ISREG(buf.st_mode) || S_ISLNK(buf.st_mode)))
3bcb62
 			continue;
3bcb62
 
3bcb62
 		acm_log(2, "Loading provider %s...\n", file_name);
3bcb62
-- 
3bcb62
2.25.4
3bcb62