diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index c6f9d3d18ed1f9263ab821c294fcf13d2e19eb2c..9aa31f11056dc42d75461755377f7fc5f69a06c5 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -899,6 +899,9 @@ static struct nft_stats __percpu *nft_stats_alloc(const struct nlattr *attr) static void nft_chain_stats_replace(struct nft_base_chain *chain, struct nft_stats __percpu *newstats) { + if (newstats == NULL) + return; + if (chain->stats) { struct nft_stats __percpu *oldstats = nft_dereference(chain->stats);