Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp222001rdb; Thu, 8 Feb 2024 04:18:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVci9HOb7EEW2GNBXj8dwjDuMPuipMYfh6H5TTV1XACac8XZFn/apcwBlXC9DwYb3rWII9x6JwWVZjoZWKMHrMiFMcnisNTX9Gvmpg9Pg== X-Google-Smtp-Source: AGHT+IFxHaze5RsU4dJIZ3mwjYMbFbnbOfnCWy8ehQu/8mNrkq7XBU61/b3okqwd7YHa27sGDaFR X-Received: by 2002:a17:907:7803:b0:a37:501c:9eab with SMTP id la3-20020a170907780300b00a37501c9eabmr6114578ejc.43.1707394686364; Thu, 08 Feb 2024 04:18:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707394686; cv=pass; d=google.com; s=arc-20160816; b=rJT+ZDYTi8HysfqNce8NFvmXTm5S715CrYju5QKA8h/D0RdGKJ4sBh3IzaKwEUq75Y JE4iqVnjLp1/XdSbEfDOJXFPYSfECrXsIloYGbQEP/rj5ejQrUkPEQuDkz69JZzIhKMk WiOM36ZHILFU5cVJu31WvTwN8y9EWWRjoLPodzgwrjkgc95tduq8aMOhyjOUy5PmfHL2 k/Cmkq6lnC2IwYmA+/CWjVMRJOG0Y9MYHErqm5v+Ow6JM6Flubgu7vqlanvAIYsNxgXj rLsSfHS2/cwx352E1s57W6A5p9dNWjp0Gun1DCvMWjb5RgjYlSpyGtLwg7C+C1RIg3CQ t0Uw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:in-reply-to:from:references:to:content-language:cc :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=5KIXw9EqByij/g2+XWpCka8yJIyrkdD/nWaJPuGPCr0=; fh=W1IRezZZeikGAmXqrll4JR8GGi/ZRnGYYFlv/YelOPU=; b=KvGxi2jaTxFxLoHwK94CeTLJZb9G9o2OnbVpXU1Z97UPBHyE/7DqeLG420uZAEkv9k h0IHXklXDv7t0VshNLdRDJKLOZyBVGQOBHB2k83z3LkZzirndiIeonrAytkDYL4S4Vda vPhsgEScrsu1g/qq3geKc0iUw4VnxrwyJACvy8cSYON3rD4xs2A2a1dpXDp5Ze6VdQ9e kYDIYYC3RGzhE0wX5jL4I3gz/EYTvSpcxZUMZW3Kkqsyv4oIbIf1pNcyz8/yieKPotKA PIsweDrq47XR919OeBaUtMl+sMnG3ggC6AZBw6cPXo4GCgUm/Qukb4BMrKKQsVHDguk5 0Ggg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=vrvis.at); spf=pass (google.com: domain of linux-kernel+bounces-58037-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58037-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCWRTWICg9tdF00VeZzPlztyb21j6ZT1prQb2iQAuUN+50RRsNdF0kGJBqTyCr2c0cDDPhLwHwzDKasDbZzbSuEK0lVoR0FrSmj5nqFE7g== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ko23-20020a170907987700b00a381e72bce1si1997446ejc.967.2024.02.08.04.18.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 04:18:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58037-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=vrvis.at); spf=pass (google.com: domain of linux-kernel+bounces-58037-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58037-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CB3E91F2A863 for ; Thu, 8 Feb 2024 12:18:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FDCD71B5B; Thu, 8 Feb 2024 12:17:57 +0000 (UTC) Received: from iris.vrvis.at (iris.vrvis.at [92.60.8.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EFD46F079; Thu, 8 Feb 2024 12:17:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.60.8.8 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707394676; cv=none; b=Uilvv9dSY9xUFpgPNMMkUIlhUSvRlDHCOaG0enFWh/CflnUnYk0mWnQVbN+v9NhIyDJly2dQ9w/xWd7O4OfltUyo1XkFulddb10Uqvnc/BP0mThnS2nZgzAwVgPNHX5BI9PzpAcV9emKfrdZAMMAqoWtSlmGG50r16aB9VeQiZE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707394676; c=relaxed/simple; bh=em70S6fl4jXKXISeqX4EQDrqUqnNdkplx9N5uRCApyE=; h=Content-Type:Message-ID:Date:MIME-Version:Cc:To:References:From: In-Reply-To:Subject; b=pO6yZz6Fa/mo6gTlo/1zZ1Gn/zPV3Q/4NE5cM8VhU1uiq6a/10Pz+0dbXqBY3KDqA3kmhcKDIIvSUmMxExx6Ddd/8ztwHwp52pc9uxMUSgl4wKPp/DghruVbC1M4hp/66y3TK+8b5HpbEz5vbYc/a8jmk8qQVXeBJlNKFagA5v4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=vrvis.at; spf=pass smtp.mailfrom=vrvis.at; arc=none smtp.client-ip=92.60.8.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=vrvis.at Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vrvis.at Received: from whiskey.org.vrvis.lan ([10.42.2.171]) by iris.vrvis.at with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (ESMPT Server) (envelope-from ) id 1rY2ii-0004Cp-0r; Thu, 08 Feb 2024 12:37:37 +0100 Content-Type: multipart/mixed; boundary="------------8nT1Vb4atVC4dwNucelwL7VP" Message-ID: <1d4c7d06-0c02-4adb-a2a3-ec85fd802ddb@vrvis.at> Date: Thu, 8 Feb 2024 12:37:31 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: David Teigland , Alexander Aring , 1063338@bugs.debian.org, gfs2@lists.linux.dev, linux-kernel@vger.kernel.org, stable@vger.kernel.org, gregkh@linuxfoundation.org, regressions@lists.linux.dev Content-Language: en-US To: Jordan Rife , Salvatore Bonaccorso References: <38f51dbb-65aa-4ec2-bed2-e914aef27d25@vrvis.at> From: Valentin Kleibel In-Reply-To: X-Spam-Level: X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -4.5 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 GREYLIST_ISWHITE The incoming server has been whitelisted for this * receipient and sender Subject: Re: [regression 6.1.76] dlm: cannot start dlm midcomms -97 after backport of e9cdebbe23f1 ("dlm: use kernel_connect() and kernel_bind()") X-SA-Exim-Version: 4.2.1 (built Wed, 06 Jul 2022 17:57:39 +0000) This is a multi-part message in MIME format. --------------8nT1Vb4atVC4dwNucelwL7VP Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Jordan, hi all > Just a quick look comparing dlm_tcp_listen_bind between the latest 6.1 > and 6.6 stable branches, > it looks like there is a mismatch here with the dlm_local_addr[0] parameter. > > 6.1 > ---- > > static int dlm_tcp_listen_bind(struct socket *sock) > { > int addr_len; > > /* 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], > addr_len); > } > > 6.6 > ---- > static int dlm_tcp_listen_bind(struct socket *sock) > { > int addr_len; > > /* 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], > addr_len); > } > > 6.6 contains commit c51c9cd8 (fs: dlm: don't put dlm_local_addrs on heap) which > changed > > static struct sockaddr_storage *dlm_local_addr[DLM_MAX_ADDR_COUNT]; > > to > > static struct sockaddr_storage dlm_local_addr[DLM_MAX_ADDR_COUNT]; > > It looks like kernel_bind() in 6.1 needs to be modified to match. We tried to apply commit c51c9cd8 (fs: dlm: don't put dlm_local_addrs on heap) to the debian kernel 6.1.76 and came up with the attached patch. Besides the different offsets there is a slight change dlm_tcp_bind() where in 6.1.76 kernel_bind() is used instead of sock->ops->bind() in the original commit. This patch solves the issue we experienced. Thanks for your help, Valentin --------------8nT1Vb4atVC4dwNucelwL7VP Content-Type: text/x-patch; charset=UTF-8; name="dlm_dont_put_dlm_local_addrs_on_heap.patch" Content-Disposition: attachment; filename="dlm_dont_put_dlm_local_addrs_on_heap.patch" Content-Transfer-Encoding: base64 LS0tIGEvZnMvZGxtL2xvd2NvbW1zLmMJMjAyNC0wMi0wOCAxMDo0MjoxOS4zMjg4NjE0Nzkg KzAxMDAKKysrIGIvZnMvZGxtL2xvd2NvbW1zLmMJMjAyNC0wMi0wOCAxMDo1NzoyMi45MDA0 NjMxNDkgKzAxMDAKQEAgLTE3NCw3ICsxNzQsNyBAQAogc3RhdGljIERFRklORV9TUElOTE9D SyhkbG1fbm9kZV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