Re: [PATCH net 1/4] netfilter: flowtable: do not queue offload work after DESTROY

From: Pablo Neira Ayuso

Date: Sun Nov 22 2026 - 17:16:19 EST


On Sun, Nov 22, 2026 at 09:17:24PM +0000, netdev-bot+sashiko@xxxxxxxxxx wrote:
> The creating CPU then carries on:
>
> CPU1 (creator) CPU2 (GC)
> flow_offload_add()
> rhashtable_insert_fast(REPLY)
> rhashtable_insert_fast(ORIGINAL)
> nf_flow_offload_gc_step()
> teardown, NF_FLOW_HW clear
> flow_offload_del()
> flow_offload_free()
> call_rcu()
> nf_flow_offload_add()
> set_bit(NF_FLOW_HW)
> nf_flow_offload_refresh()
> nf_flow_offload_work_alloc()
> test_and_set_bit(NF_FLOW_PENDING) succeeds
> NF_FLOW_HW_DYING clear, new check passes
> queue FLOW_CLS_REPLACE

Yes, PENDING needs to be held from flow_offload_add() path for this.