On Mon, Oct 28, 2024 at 05:22:14PM +0100, Pablo Neira Ayuso wrote: > +int __nft_release_basechain(struct nft_ctx *ctx) > +{ > + struct nft_rule *rule; > > if (WARN_ON(!nft_is_base_chain(ctx->chain))) > return 0; > > + if (!maybe_get_net(ctx->net)) > + return 0; Hm, this does not work either. If I skip releasing basechains here from event path, then it seems netns_exit path sees a stale net_device reference which was already removed before via _UNREGISTER event.