From: Alexander Aring <aahringo@redhat.com>
To: teigland@redhat.com
Cc: gfs2@lists.linux.dev, aahringo@redhat.com
Subject: [PATCH v6.11-rc1 03/10] dlm: never return invalid nodeid by dlm_our_nodeid()
Date: Mon, 29 Jul 2024 15:36:23 -0400 [thread overview]
Message-ID: <20240729193630.3344082-3-aahringo@redhat.com> (raw)
In-Reply-To: <20240729193630.3344082-1-aahringo@redhat.com>
This patch will remote the return of an invalid nodeid value when
local_comm is not set. This case should never happen as the DLM stack
tries to compare valid nodeids with an invalid nodeid returned by
dlm_our_nodeid(). Instead we let it crash to getting at least recognized
if we running into such state.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
---
fs/dlm/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dlm/config.c b/fs/dlm/config.c
index 99952234799e..eac96f1c1d74 100644
--- a/fs/dlm/config.c
+++ b/fs/dlm/config.c
@@ -928,7 +928,7 @@ int dlm_comm_seq(int nodeid, uint32_t *seq)
int dlm_our_nodeid(void)
{
- return local_comm ? local_comm->nodeid : 0;
+ return local_comm->nodeid;
}
/* num 0 is first addr, num 1 is second addr */
--
2.43.0
next prev parent reply other threads:[~2024-07-29 19:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-29 19:36 [PATCH v6.11-rc1 01/10] dlm: cleanup memory allocation helpers Alexander Aring
2024-07-29 19:36 ` [PATCH v6.11-rc1 02/10] dlm: remove unnecessary refcounts Alexander Aring
2024-07-29 19:36 ` Alexander Aring [this message]
2024-07-29 19:36 ` [PATCH v6.11-rc1 04/10] dlm: warn about invalid nodeid comparsions Alexander Aring
2024-07-29 19:36 ` [PATCH v6.11-rc1 05/10] dlm: drop kobject release callback handling Alexander Aring
2024-07-29 19:36 ` [PATCH v6.11-rc1 06/10] dlm: async freeing of lockspace resources Alexander Aring
2024-07-30 15:37 ` Alexander Aring
2024-07-29 19:36 ` [PATCH v6.11-rc1 07/10] dlm: use RSB_HASHED to avoid lookup twice Alexander Aring
2024-07-29 19:36 ` [PATCH v6.11-rc1 08/10] dlm: move dlm_search_rsb_tree() out of lock Alexander Aring
2024-07-29 19:36 ` [PATCH v6.11-rc1 09/10] dlm: move lkb xarray lookup " Alexander Aring
2024-07-29 19:36 ` [PATCH v6.11-rc1 10/10] dlm: do synchronized socket connect call Alexander Aring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240729193630.3344082-3-aahringo@redhat.com \
--to=aahringo@redhat.com \
--cc=gfs2@lists.linux.dev \
--cc=teigland@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox