On 17 Oct 2025, at 19:11, Ilya Maximets wrote:
> Clang 21 now properly implements GUARDED annotations for structure
> fields, and so it complains about those fields being accessed in
> init/create/destroy type of functions that normally do not take any
> locks, as the data is just allocated and not available to other
> threads. Add some locks where it is simple to do, so we don't have
> to turn off the analysis entirely, in other places just turn off the
> analysis.
>
> While at it, adding a couple of missed annotations that clang started
> to complain about due to actual support for the GUARDED annotation on
> structure fields. Added some unused arguments to a couple of functions
> to be able to specify which lock is required. It seemed better than
> turning off the analysis.
>
> Signed-off-by: Ilya Maximets <[email protected]>
Hi Ilya, thanks for fixing this!
I was just wondering why sometimes you decided to add
OVS_NO_THREAD_SAFETY_ANALYSIS, and in other instances, just take the lock/mutex
on init functions? Anyway, both are fine with me.
Acked-by: Eelco Chaudron [email protected]
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev