From dec5ffd309967e429b616a9d498037a5eb437c54 Mon Sep 17 00:00:00 2001 From: Jordan Rife Date: Thu, 8 Feb 2024 12:09:55 -0600 Subject: [PATCH] dlm: Treat dlm_local_addr[0] as sockaddr_storage * Backport e11dea8 ("dlm: use kernel_connect() and kernel_bind()") to Linux stable 6.1 caused a regression. The original patch expected dlm_local_addrs[0] to be of type sockaddr_storage, because c51c9cd ("fs: dlm: don't put dlm_local_addrs on heap") changed its type from sockaddr_storage* to sockaddr_storage in Linux 6.5+ while in older Linux versions this is still the original sockaddr_storage*. Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1063338 Fixes: e11dea8 ("dlm: use kernel_connect() and kernel_bind()") Signed-off-by: Jordan Rife --- fs/dlm/lowcomms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 72f34f96d0155..8426073e73cf2 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -1900,7 +1900,7 @@ static int dlm_tcp_listen_bind(struct socket *sock) /* Bind to our port */ make_sockaddr(dlm_local_addr[0], dlm_config.ci_tcp_port, &addr_len); - return kernel_bind(sock, (struct sockaddr *)&dlm_local_addr[0], + return kernel_bind(sock, (struct sockaddr *)dlm_local_addr[0], addr_len); } -- 2.43.0.687.g38aa6559b0-goog