mirror of https://gitee.com/openkylin/linux.git
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) flow_block_cb memleak in nf_flow_table_offload_del_cb(), from Roi Dayan. 2) Fix error path handling in nf_nat_inet_register_fn(), from Hillf Danton. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
76fc6a9a9a
|
@ -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);
|
||||
|
|
|
@ -1035,8 +1035,8 @@ int nf_nat_inet_register_fn(struct net *net, const struct nf_hook_ops *ops)
|
|||
ret = nf_nat_register_fn(net, NFPROTO_IPV4, ops, nf_nat_ipv4_ops,
|
||||
ARRAY_SIZE(nf_nat_ipv4_ops));
|
||||
if (ret)
|
||||
nf_nat_ipv6_unregister_fn(net, ops);
|
||||
|
||||
nf_nat_unregister_fn(net, NFPROTO_IPV6, ops,
|
||||
ARRAY_SIZE(nf_nat_ipv6_ops));
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nf_nat_inet_register_fn);
|
||||
|
|
Loading…
Reference in New Issue