hi Qingfang,

When resending, please split the subject as "ovpn net" so that our patchwork 
can pick it up correctly.

Thanks a lot!

Il 24 Luglio 2026 03:20:51 CEST, Qingfang Deng <[email protected]> ha 
scritto:
>Hi Ralf,
>
>On 2026/7/23 15:59, Ralf Lici wrote:
>> rcu_dereference relies on rcu_read_lock_held to check that the caller
>> context is valid. However, ovpn_peer_release_p2p does not hold a normal
>> rcu_read_lock section, it relies on the BH-disabled section established
>> by spin_lock_bh instead.
>> 
>> rcu_read_lock_held does not consider BH-disabled context, so it will
>> return false here. In contrast, rcu_read_lock_bh_held explicitly
>> recognizes BH-disabled/softirq context.
>> 
>> So I think Sashiko is right: rcu_dereference will trigger its RCU
>> lockdep warning with CONFIG_PROVE_RCU enabled. This should use
>> rcu_dereference_bh instead.
>
>I read the code, and found that you are correct. I'll submit a new patch with 
>your suggested change. Thank you.
>
>Best regards,
>
>Qingfang
>

Antonio Quartulli
Edited on mobile, please excuse typos and brevity.


_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to