[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200412084547.2217-1-roid@mellanox.com>
Date: Sun, 12 Apr 2020 11:45:47 +0300
From: Roi Dayan <roid@...lanox.com>
To: netdev@...r.kernel.org, netfilter-devel@...r.kernel.org,
pablo@...filter.org, davem@...emloft.net
Cc: Jiri Pirko <jiri@...lanox.com>, Paul Blakey <paulb@...lanox.com>,
Oz Shlomo <ozsh@...lanox.com>, Roi Dayan <roid@...lanox.com>
Subject: [PATCH net] netfilter: flowtable: Free block_cb when being deleted
Free block_cb memory when asked to be deleted.
Fixes: 978703f42549 ("netfilter: flowtable: Add API for registering to flow table events")
Signed-off-by: Roi Dayan <roid@...lanox.com>
Reviewed-by: Paul Blakey <paulb@...lanox.com>
Reviewed-by: Oz Shlomo <ozsh@...lanox.com>
---
net/netfilter/nf_flow_table_core.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/nf_flow_table_core.c b/net/netfilter/nf_flow_table_core.c
index c0cb79495c35..4344e572b7f9 100644
--- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c
@@ -421,10 +421,12 @@ void nf_flow_table_offload_del_cb(struct nf_flowtable *flow_table,
down_write(&flow_table->flow_block_lock);
block_cb = flow_block_cb_lookup(block, cb, cb_priv);
- if (block_cb)
+ if (block_cb) {
list_del(&block_cb->list);
- else
+ flow_block_cb_free(block_cb);
+ } else {
WARN_ON(true);
+ }
up_write(&flow_table->flow_block_lock);
}
EXPORT_SYMBOL_GPL(nf_flow_table_offload_del_cb);
--
2.8.4
Powered by blists - more mailing lists