Re: [PATCH nft 2/2] libnftables: move init-once guard inside xt_init()

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


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

[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux