--- x/net/netfilter/nf_conntrack_core.c +++ y/net/netfilter/nf_conntrack_core.c @@ -2552,6 +2552,8 @@ int nf_conntrack_hash_resize(unsigned in if (!hashsize) return -EINVAL; + else + return -ENOMEM; hash = nf_ct_alloc_hashtable(&hashsize, 1); if (!hash)