Skip to contentSkip to conversation

netfilter: nf_tables: skip module reference count bump on object updates

PATCH New Pablo Neira Ayuso 1 participant 1 message Dec 6, 2019

Subsystems (2)
lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 netfilter: nf_tables: skip module reference count bump on object updates

Use __nft_obj_type_get() instead, otherwise there is a module reference counter leak.

Fixes d62d0ba97b58 ("netfilter: nf_tables: Introduce stateful object update operation")
---
 net/netfilter/nf_tables_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_tables_api.c +1 -1
index 72a7816ba761..a8caf7386fa9 100644
@@ -5484,7 +5484,7 @@ static int nf_tables_newobj(struct net *net, struct sock *nlsk,
 		if (nlh->nlmsg_flags & NLM_F_REPLACE)
 			return -EOPNOTSUPP;
 
-		type = nft_obj_type_get(net, objtype);
+		type = __nft_obj_type_get(objtype);
 		nft_ctx_init(&ctx, net, skb, nlh, family, table, NULL, nla);
 
 		return nf_tables_updobj(&ctx, type, nla[NFTA_OBJ_DATA], obj);
Signature · 1 line
2.11.0