Re: [PATCH] xfrm: policy: Read seqcount outside of rcu-read side in xfrm_policy_lookup_bytype

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux