Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp539688rdb; Thu, 8 Feb 2024 13:17:42 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU+JsdGdBynW0EwZ+1X8e4YQ8P/pv6CC5POOp7FM0XU6Nvx8qCmqSLOPkbUu8a+5s8xwaKvRLtQ520Uwam0pniUQMdof4SLtwSEKSpHiA== X-Google-Smtp-Source: AGHT+IFhwJFEFEFX8tEUXvN1WiuDvYW4OgqA1/6Boi/kScRmXKKETWXaUxYVU71gk6KjAREQsYPp X-Received: by 2002:a05:620a:2146:b0:785:8c2f:2f9d with SMTP id m6-20020a05620a214600b007858c2f2f9dmr5493104qkm.20.1707427062299; Thu, 08 Feb 2024 13:17:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707427062; cv=pass; d=google.com; s=arc-20160816; b=EQPHOXgnzisQSPGauIqw2NryvTG8ASPo6ZyYXUN/TUuZu+dB8l2TGecG7u9i9a0lbu ri/ZeHV72guGZacd2vVp5kcSpP1QC50dAmlfyDVcNTK6HpwstreEwz/zTaT3SQ7RvYKj jQuT0I1VdKmC3udQGg+usmYL7+/EAhrr74y0DmogxqY1SQ5hxJF6+Ckvnp162EOwIqg4 5f6n3Y2X6OT4p5YDZGvLfKbJ4X1QhWybYPr9raQScY1qy8bSZniCk45jaksFK1qi83VH rvzclXu9e2cd/8SPOTGqb4lhPr4Izi53ql+CSZWiSoMVhb9d2Z+2VzbCMv+67vQe5I6E HxNw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=1FFveSw5oBTNx3rWpSsAiIZo1mBSaoRlz6hNqseCzfQ=; fh=1BdFexaI0aUAV7Nzjq+zasmATpcjhmCIKoEcbP5yy38=; b=EGnrjR32q49bRHVSK6e5w9XMoFdtmR6GQpTqkBHylocKE+IsWkbu+XRpj0ft49AaJo X/1/J/v+aROza/AGJzPzgezkqDdsbxcxGJzh03Wde/EFaCSBF6DtuqoRAC+CPKyW+FKr rTV/ijjFuLaTtQ398hR9T9jiUAkYvtDVMLpim00sP4YM4QNyH727Q9NHgHUo99fZMsws rK3czApGVmM4WDgGuyIp6vdL0kPLLv8xNzyy+XdB4p5YKM8U+uftvZkzXNCn/eVgIYhw NBf+tpsLHpl+/dDautnd9erP7QfyzS0hiSBx4fCF/MSzvxJVDePX8qOpNGUMQQcq+6JT Vumg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Dc+D0yd3; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-58703-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58703-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCULhdiPdgD8fhv/ceNrJWTBQB8Rk3GDnERb+1x3a2dMOkuPK64FvapIvxyAOA+2dOkj+D/ssWni2iLVOZw0k0MY9optcVygKK/YpF0Gow== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g22-20020ac87f56000000b0042c0d9329f2si352673qtk.254.2024.02.08.13.17.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 13:17:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58703-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Dc+D0yd3; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-58703-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58703-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 058D31C2371B for ; Thu, 8 Feb 2024 21:17:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0653A3F9EB; Thu, 8 Feb 2024 21:17:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Dc+D0yd3" Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BEE9E4F1E7 for ; Thu, 8 Feb 2024 21:17:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707427050; cv=none; b=S6a0BT3/1AZ7t1Ayw4vnmfNHlaIdh0XcrjRDrxQEZdb8wpicduQ21odyH+FOYzo6YZWTlU2LO/xIoUnB4oYaWXbXDqmtEjIhjM5suOJXuY/W9EsthegdtNGuMh2lwPa40VJ4EW6ez0LeTLdec9ZzlnXme4BQJq5cfjz51xPPYkI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707427050; c=relaxed/simple; bh=lR1vqEr+NUueGl/+e/z1Y6yt2E6StmXXzwjSE/g3B3w=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=k/XvIZjBx+XaZziiLC94hLjuB33vOrW9Th40Aq9+b6XWssaDLK7wtY07prwjM0jSJNb2GAe2fsaN0dTsLV0PY6Fo3t+AuWpzmulhBYHwbC7mhxzYHPpDmXQVYuqGPIz/Nu2K+SVgmpBZ/w7urdVgh5wJ5QH0yRjNsFK3spUOxQw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Dc+D0yd3; arc=none smtp.client-ip=209.85.167.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-51167e470f7so320471e87.2 for ; Thu, 08 Feb 2024 13:17:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707427045; x=1708031845; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1FFveSw5oBTNx3rWpSsAiIZo1mBSaoRlz6hNqseCzfQ=; b=Dc+D0yd3Um2nfU2XTvkktgvitiknX1q7p6DxSk+6A2aK9UyiMWrn7QPTo4OKEaJzMX TnhoGDGeWLEK/X0mMQJaHxeC6VeeGv0UlCXz/G8GTpWI0lFIxZ4cDGKLvf2Kh6GPGrIA CaQp1oOMiVCVkN0eLZFxtIlkwGwdmDy6uOqyy4Ql4v42q4yORAGYUb98YUOS+NGFdsBi nVGUpvMgDQo3/sMxbIKc0GhUnR0Q1l53JMhO7JMeGCcX9Fq6TQep2l5qofQ8CJGZu5hw uj1rBeWMjK/0mb1t4AaOxVhel/a0SkMq2JWQixKthCCsUG8clKOlq2hHcM848c4oYyll Vlnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707427045; x=1708031845; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1FFveSw5oBTNx3rWpSsAiIZo1mBSaoRlz6hNqseCzfQ=; b=n3mbhHflnNj6s/ZPG9DhkfEKQUTkU0DW4j3cZfjuyE9b0oBRnioLdfkS2M7BPAC070 hsIi0w97RtJvZz4MkC8fjTcyRmRWt3PA2fAYfXTFsxkt9QGReBZ8+sf5xnX5LGE3G2oV TuX95vYUI6odain1PvJ+C4jz7KNd1D1FBhPuXahdEi49ZNDrqbu85JaMS84Uda9ioGwx eiRRVSdxQdVC5UEz6d3Om0TS0NGYUKO8g/60+/PJAduSTcg3+gSINagVZM3ElCRJfz1W Je23lceVC5KWPDq9L8BfK35yM7sVxDy2sUQV/9vELl4oZyCGiiN1RIop0Ar3NI976NRG oq3Q== X-Forwarded-Encrypted: i=1; AJvYcCVABpKDSnvSCYL1pCMbk+Nr/ICOCdYQ/v8ImXihA7Z3PMSj5+tfNWqJkAKBrFFYUUORNTitCM3SK7MV3zr8BOpLWPbowUfIvmgsLkFr X-Gm-Message-State: AOJu0Yz4WXMSzPPm4ziG2QyGZgeQtiniSW23Lvd5ieA9SqQGRUIjyRbc c14Iio7LdBkqQXwofunHg/mf8FZI4JBVXjjG2CN/R2n/KwYusNZlEQmAAbYwKclQfXY59kUAF4j 2rdatAb4A+Pia+1YLUC4cNb9NxN41/OVZUrWQcwlALezlMv5wtg== X-Received: by 2002:ac2:447a:0:b0:511:454d:25e3 with SMTP id y26-20020ac2447a000000b00511454d25e3mr265348lfl.41.1707427044605; Thu, 08 Feb 2024 13:17:24 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <38f51dbb-65aa-4ec2-bed2-e914aef27d25@vrvis.at> <1d4c7d06-0c02-4adb-a2a3-ec85fd802ddb@vrvis.at> In-Reply-To: From: Jordan Rife Date: Thu, 8 Feb 2024 13:17:11 -0800 Message-ID: Subject: Re: [regression 6.1.76] dlm: cannot start dlm midcomms -97 after backport of e9cdebbe23f1 ("dlm: use kernel_connect() and kernel_bind()") To: Valentin Kleibel Cc: Salvatore Bonaccorso , 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-Type: multipart/mixed; boundary="0000000000007a52e50610e556ed" --0000000000007a52e50610e556ed Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Valentin, Would you be able to confirm that the attached patch fixes your issue as we= ll? -Jordan On Thu, Feb 8, 2024 at 9:42=E2=80=AFAM Jordan Rife wrote= : > > On Thu, Feb 8, 2024 at 3:37=E2=80=AFAM Valentin Kleibel wrote: > > > > 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] par= ameter. > > > > > > 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 h= eap) 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 o= n > > 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 > > Good to hear that works for you! We should fix this in the 6.1 stable > kernel as well. > > IMO it may be less risky and simpler to fix the backport of my patch > e9cdebbe23f1 ("dlm: use kernel_connect() and > kernel_bind()") and just switch (struct sockaddr *)&dlm_local_addr[0] > to (struct sockaddr *)dlm_local_addr[0] > in the call to kernel_bind() rather than backporting c51c9cd8 (fs: > dlm: don't put dlm_local_addrs on > heap) to 6.1. > > I will have some time soon to fix the 6.1 backport, but it may make > sense just to revert in the meantime. > > -Jordan --0000000000007a52e50610e556ed Content-Type: text/x-patch; charset="US-ASCII"; name="0001-dlm-Treat-dlm_local_addr-0-as-sockaddr_storage.patch" Content-Disposition: attachment; filename="0001-dlm-Treat-dlm_local_addr-0-as-sockaddr_storage.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lsdpwbpg0 RnJvbSBkZWM1ZmZkMzA5OTY3ZTQyOWI2MTZhOWQ0OTgwMzdhNWViNDM3YzU0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKb3JkYW4gUmlmZSA8anJpZmVAZ29vZ2xlLmNvbT4KRGF0ZTog VGh1LCA4IEZlYiAyMDI0IDEyOjA5OjU1IC0wNjAwClN1YmplY3Q6IFtQQVRDSF0gZGxtOiBUcmVh dCBkbG1fbG9jYWxfYWRkclswXSBhcyBzb2NrYWRkcl9zdG9yYWdlICoKCkJhY2twb3J0IGUxMWRl YTggKCJkbG06IHVzZSBrZX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