mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
netfilter: flowtable: Fix missing flush hardware on table free
If entries exist when freeing a hardware offload enabled table,
we queue work for hardware while running the gc iteration.
Execute it (flush) after queueing.
Fixes: c29f74e0df ("netfilter: nf_flow_table: hardware offload support")
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
committed by
Pablo Neira Ayuso
parent
91bfaa15a3
commit
0f34f30a1b
@@ -553,6 +553,7 @@ void nf_flow_table_free(struct nf_flowtable *flow_table)
|
|||||||
cancel_delayed_work_sync(&flow_table->gc_work);
|
cancel_delayed_work_sync(&flow_table->gc_work);
|
||||||
nf_flow_table_iterate(flow_table, nf_flow_table_do_cleanup, NULL);
|
nf_flow_table_iterate(flow_table, nf_flow_table_do_cleanup, NULL);
|
||||||
nf_flow_table_iterate(flow_table, nf_flow_offload_gc_step, flow_table);
|
nf_flow_table_iterate(flow_table, nf_flow_offload_gc_step, flow_table);
|
||||||
|
nf_flow_table_offload_flush(flow_table);
|
||||||
rhashtable_destroy(&flow_table->rhashtable);
|
rhashtable_destroy(&flow_table->rhashtable);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(nf_flow_table_free);
|
EXPORT_SYMBOL_GPL(nf_flow_table_free);
|
||||||
|
|||||||
Reference in New Issue
Block a user