* [PATCH] dlm: don't warn when closing a node without a connection
@ 2026-10-14 9:02 vienna-0FFH
2026-10-14 11:49 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: vienna-0FFH @ 2026-10-14 9:02 UTC (permalink / raw)
To: Alexander Aring, David Teigland
Cc: gfs2, linux-kernel, stable, viennaoffh, syzbot+04dfbd15d442517e713a
Opening and closing a configfs comm entry without ever configuring an
address for it triggers the following warning:
mkdir /sys/kernel/config/dlm/cluster
mkdir /sys/kernel/config/dlm/cluster/comms/1
rmdir /sys/kernel/config/dlm/cluster/comms/1
dlm: closing connection to node 1
------------[ cut here ]------------
!con
WARNING: fs/dlm/lowcomms.c:1455 at dlm_lowcomms_close+0x12d/0x470, CPU#1
Since commit 6f0b0b5d7ae7 ("fs: dlm: remove dlm_node_addrs lookup list")
the lowcomms connection has the same lifetime as the configfs comm
entry, but a connection is only created when an address is configured
via the addr attribute. Removing a comm entry for which no address was
ever set up is valid and the resulting close call has simply nothing
to do, so it must not warn.
Reported-by: syzbot+04dfbd15d442517e713a@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=04dfbd15d442517e713a
Fixes: 6f0b0b5d7ae7 ("fs: dlm: remove dlm_node_addrs lookup list")
Cc: stable@vger.kernel.org
Signed-off-by: vienna-0FFH <viennaoffh@gmail.com>
---
fs/dlm/lowcomms.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 2aff1c7..86c7af9 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -1452,7 +1452,11 @@ int dlm_lowcomms_close(int nodeid)
idx = srcu_read_lock(&connections_srcu);
con = nodeid2con(nodeid, 0);
- if (WARN_ON_ONCE(!con)) {
+ /* case of dlm_midcomms_close() for a node which never had an
+ * address configured, so no connection was ever created and
+ * there is nothing to close
+ */
+ if (!con) {
srcu_read_unlock(&connections_srcu, idx);
return -ENOENT;
}
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] dlm: don't warn when closing a node without a connection
2026-10-14 9:02 [PATCH] dlm: don't warn when closing a node without a connection vienna-0FFH
@ 2026-10-14 11:49 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2026-10-14 11:49 UTC (permalink / raw)
To: vienna-0FFH
Cc: Alexander Aring, David Teigland, gfs2, linux-kernel, stable,
syzbot+04dfbd15d442517e713a
On Wed, Oct 14, 2026 at 05:02:37PM +0800, vienna-0FFH wrote:
> Opening and closing a configfs comm entry without ever configuring an
> address for it triggers the following warning:
>
> mkdir /sys/kernel/config/dlm/cluster
> mkdir /sys/kernel/config/dlm/cluster/comms/1
> rmdir /sys/kernel/config/dlm/cluster/comms/1
>
> dlm: closing connection to node 1
> ------------[ cut here ]------------
> !con
> WARNING: fs/dlm/lowcomms.c:1455 at dlm_lowcomms_close+0x12d/0x470, CPU#1
>
> Since commit 6f0b0b5d7ae7 ("fs: dlm: remove dlm_node_addrs lookup list")
> the lowcomms connection has the same lifetime as the configfs comm
> entry, but a connection is only created when an address is configured
> via the addr attribute. Removing a comm entry for which no address was
> ever set up is valid and the resulting close call has simply nothing
> to do, so it must not warn.
>
> Reported-by: syzbot+04dfbd15d442517e713a@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=04dfbd15d442517e713a
> Fixes: 6f0b0b5d7ae7 ("fs: dlm: remove dlm_node_addrs lookup list")
> Cc: stable@vger.kernel.org
> Signed-off-by: vienna-0FFH <viennaoffh@gmail.com>
Real name is needed please.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-14 11:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-14 9:02 [PATCH] dlm: don't warn when closing a node without a connection vienna-0FFH
2026-10-14 11:49 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®