On Tue, Sep 19, 2023 at 02:36:17PM +0200, Thomas Haller wrote: > A library should not restrict being used by multiple threads or make > assumptions about how it's being used. Hence a "init_once" pattern > without no locking is racy, a code smell and should be avoided. > > Note that libxtables is full of global variables and when linking against > it, libnftables cannot be used from multiple threads either. That is not > easy to fix. > > Move the ugliness of "init_once" away from nft_ctx_new(), so that the > problem is concentrated closer to libxtables. Also applied, thanks