From: Pingfan Liu <kernelfans@gmail.com>
To: rcu@vger.kernel.org
Cc: Pingfan Liu <kernelfans@gmail.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
Frederic Weisbecker <frederic@kernel.org>,
Josh Triplett <josh@joshtriplett.org>,
Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: [PATCH 2/2] srcu: Fix the comparision in srcu_invl_snp_seq()
Date: Wed, 16 Nov 2022 09:52:44 +0800 [thread overview]
Message-ID: <20221116015244.10539-2-kernelfans@gmail.com> (raw)
In-Reply-To: <20221116015244.10539-1-kernelfans@gmail.com>
A seq contains two fields: counter and state.
SRCU_SNP_INIT_SEQ is used as invalid initial value for srcu_node GP
sequence numbers. Hence srcu_invl_snp_seq() should compare both fields
of a seq.
Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: rcu@vger.kernel.org
---
kernel/rcu/srcutree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c
index 1c304fec89c0..725c82bb0a6a 100644
--- a/kernel/rcu/srcutree.c
+++ b/kernel/rcu/srcutree.c
@@ -154,7 +154,7 @@ static void init_srcu_struct_data(struct srcu_struct *ssp)
*/
static inline bool srcu_invl_snp_seq(unsigned long s)
{
- return rcu_seq_state(s) == SRCU_SNP_INIT_SEQ;
+ return s == SRCU_SNP_INIT_SEQ;
}
/*
--
2.31.1
next prev parent reply other threads:[~2022-11-16 1:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 1:52 [PATCH 1/2] srcu: Fix a misspelling in note Pingfan Liu
2022-11-16 1:52 ` Pingfan Liu [this message]
2022-11-16 13:34 ` [PATCH 2/2] srcu: Fix the comparision in srcu_invl_snp_seq() Frederic Weisbecker
2022-11-16 17:26 ` Paul E. McKenney
2022-11-17 2:34 ` Pingfan Liu
2022-11-16 12:43 ` [PATCH 1/2] srcu: Fix a misspelling in note Mukesh Ojha
2022-11-16 13:36 ` Frederic Weisbecker
2022-11-16 16:48 ` Paul E. McKenney
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=20221116015244.10539-2-kernelfans@gmail.com \
--to=kernelfans@gmail.com \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.