linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ahmed S. Darwish" <a.darwish@linutronix.de>
To: Varad Gautam <varad.gautam@suse.com>
Cc: linux-kernel@vger.kernel.org,
	linux-rt-users <linux-rt-users@vger.kernel.org>,
	netdev@vger.kernel.org, stable@vger.kernel.org,
	Steffen Klassert <steffen.klassert@secunet.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Florian Westphal <fw@strlen.de>
Subject: Re: [PATCH] xfrm: policy: Read seqcount outside of rcu-read side in xfrm_policy_lookup_bytype
Date: Fri, 28 May 2021 17:11:13 +0200	[thread overview]
Message-ID: <YLEIEa6DLjgd5mu5@lx-t490> (raw)
In-Reply-To: <20210528120357.29542-1-varad.gautam@suse.com>

On Fri, May 28, 2021, Varad Gautam wrote:
...
>
> Thead 1 (xfrm_hash_resize)	Thread 2 (xfrm_policy_lookup_bytype)
>
> 				rcu_read_lock();
> mutex_lock(&hash_resize_mutex);
> 				read_seqcount_begin(&xfrm_policy_hash_generation);
> 				mutex_lock(&hash_resize_mutex); // block
> xfrm_bydst_resize();
> synchronize_rcu(); // block
> 		<RCU stalls in xfrm_policy_lookup_bytype>
>
...
> Fixes: a7c44247f70 ("xfrm: policy: make xfrm_policy_lookup_bytype lockless")

Minor note: the 'Fixes' commit should be 77cc278f7b20 ("xfrm: policy:
Use sequence counters with associated lock") instead.

The reason read_seqcount_begin() is emitting a mutex_lock() on
PREEMPT_RT is because of the s/seqcount_t/seqcount_mutex_t/ change.

Kind regards,

--
Ahmed S. Darwish
Linutronix GmbH

  reply	other threads:[~2021-05-28 15:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 12:03 [PATCH] xfrm: policy: Read seqcount outside of rcu-read side in xfrm_policy_lookup_bytype Varad Gautam
2021-05-28 15:11 ` Ahmed S. Darwish [this message]
2021-05-28 16:06   ` Varad Gautam
2021-05-28 16:04 ` [PATCH v2] " Varad Gautam
2021-05-28 16:44   ` Ahmed S. Darwish
2021-06-03  8:16     ` Steffen Klassert

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=YLEIEa6DLjgd5mu5@lx-t490 \
    --to=a.darwish@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=fw@strlen.de \
    --cc=herbert@gondor.apana.org.au \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=steffen.klassert@secunet.com \
    --cc=varad.gautam@suse.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;
as well as URLs for NNTP newsgroup(s).