mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: zhaomzhao@126.com
Cc: frederic@kernel.org, quic_neeraju@quicinc.com,
	josh@joshtriplett.org, rostedt@goodmis.org,
	mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com,
	joel@joelfernandes.org, edumazet@google.com, rcu@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Zhao Mengmeng <zhaomengmeng@kylinos.cn>
Subject: Re: [PATCH v1] rcu: use hlist_nulls_next_rcu() in hlist_nulls_add_tail_rcu()
Date: Thu, 20 Oct 2022 11:44:16 -0700	[thread overview]
Message-ID: <20221020184416.GV5600@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <20221019123650.139210-1-zhaomzhao@126.com>

On Wed, Oct 19, 2022 at 08:36:50AM -0400, zhaomzhao@126.com wrote:
> From: Zhao Mengmeng <zhaomengmeng@kylinos.cn>
> 
> In commit 8dbd76e79a16 ("tcp/dccp: fix possible race
> __inet_lookup_established()"), function hlist_nulls_add_tail_rcu() was
> added back, but the local variable *last* is of type hlist_nulls_node,
> so use hlist_nulls_next_rcu() instead of hlist_next_rcu().
> 
> Signed-off-by: Zhao Mengmeng <zhaomengmeng@kylinos.cn>

Good eyes!

I have queued this for testing and further review.

							Thanx, Paul

> ---
>  include/linux/rculist_nulls.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/rculist_nulls.h b/include/linux/rculist_nulls.h
> index d8afdb8784c1..ba4c00dd8005 100644
> --- a/include/linux/rculist_nulls.h
> +++ b/include/linux/rculist_nulls.h
> @@ -139,7 +139,7 @@ static inline void hlist_nulls_add_tail_rcu(struct hlist_nulls_node *n,
>  	if (last) {
>  		n->next = last->next;
>  		n->pprev = &last->next;
> -		rcu_assign_pointer(hlist_next_rcu(last), n);
> +		rcu_assign_pointer(hlist_nulls_next_rcu(last), n);
>  	} else {
>  		hlist_nulls_add_head_rcu(n, h);
>  	}
> -- 
> 2.37.1
> 

      reply	other threads:[~2022-10-20 18:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19 12:36 zhaomzhao
2022-10-20 18:44 ` Paul E. McKenney [this message]

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=20221020184416.GV5600@paulmck-ThinkPad-P17-Gen-1 \
    --to=paulmck@kernel.org \
    --cc=edumazet@google.com \
    --cc=frederic@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=quic_neeraju@quicinc.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=zhaomengmeng@kylinos.cn \
    --cc=zhaomzhao@126.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

all inboxes | Powered by JetHome®