From 574511615a2e17e5dfe4754f6e9cea005b6c718a Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Tue, 29 Apr 2025 16:29:12 -0400 Subject: [PATCH] dlm: reject SCTP configuration if not enabled Reject SCTP dlm configuration if the kernel was never build with SCTP. Currently the only one known user space tool "dlm_controld" will drop an error in the logs and getting stuck. This behaviour should be fixed to deliver an error to the user or fallback to TCP. Signed-off-by: Alexander Aring Reviewed-by: Heming zhao Signed-off-by: David Teigland --- fs/dlm/config.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/dlm/config.c b/fs/dlm/config.c index cf9ba6fd7a281..a23fd524a6ee3 100644 --- a/fs/dlm/config.c +++ b/fs/dlm/config.c @@ -197,6 +197,9 @@ static int dlm_check_protocol_and_dlm_running(unsigned int x) break; case 1: /* SCTP */ + if (!IS_ENABLED(CONFIG_IP_SCTP)) + return -EOPNOTSUPP; + break; default: return -EINVAL; -- 2.47.2