LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Varad Gautam <varad.gautam@suse.com>
To: "Ahmed S. Darwish" <a.darwish@linutronix.de>
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 18:06:07 +0200	[thread overview]
Message-ID: <a288e9e5-e6d7-b732-980c-38c6d971abe9@suse.com> (raw)
In-Reply-To: <YLEIEa6DLjgd5mu5@lx-t490>

On 5/28/21 5:11 PM, Ahmed S. Darwish wrote:
> 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.
> 

Thanks, corrected it in v2.

> Kind regards,
> 
> --
> Ahmed S. Darwish
> Linutronix GmbH
> 

-- 
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5
90409 Nürnberg
Germany

HRB 36809, AG Nürnberg
Geschäftsführer: Felix Imendörffer


  reply	other threads:[~2021-05-28 16:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 12:03 Varad Gautam
2021-05-28 15:11 ` Ahmed S. Darwish
2021-05-28 16:06   ` Varad Gautam [this message]
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=a288e9e5-e6d7-b732-980c-38c6d971abe9@suse.com \
    --to=varad.gautam@suse.com \
    --cc=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 \
    --subject='Re: [PATCH] xfrm: policy: Read seqcount outside of rcu-read side in xfrm_policy_lookup_bytype' \
    /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

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox