{"id":809802,"url":"http://patchwork.ozlabs.org/api/1.2/patches/809802/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/patch/1504555874-4168-3-git-send-email-pablo@netfilter.org/","project":{"id":7,"url":"http://patchwork.ozlabs.org/api/1.2/projects/7/?format=json","name":"Linux network development","link_name":"netdev","list_id":"netdev.vger.kernel.org","list_email":"netdev@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1504555874-4168-3-git-send-email-pablo@netfilter.org>","list_archive_url":null,"date":"2017-09-04T20:11:04","name":"[02/12] netfilter: nf_tables: add select_ops for stateful objects","commit_ref":null,"pull_url":null,"state":"accepted","archived":true,"hash":"2fead5c21c268da6f0158091496669af6dea116a","submitter":{"id":1315,"url":"http://patchwork.ozlabs.org/api/1.2/people/1315/?format=json","name":"Pablo Neira Ayuso","email":"pablo@netfilter.org"},"delegate":{"id":34,"url":"http://patchwork.ozlabs.org/api/1.2/users/34/?format=json","username":"davem","first_name":"David","last_name":"Miller","email":"davem@davemloft.net"},"mbox":"http://patchwork.ozlabs.org/project/netdev/patch/1504555874-4168-3-git-send-email-pablo@netfilter.org/mbox/","series":[{"id":1451,"url":"http://patchwork.ozlabs.org/api/1.2/series/1451/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/list/?series=1451","date":"2017-09-04T20:11:02","name":"[01/12] netfilter: xt_hashlimit: add rate match mode","version":1,"mbox":"http://patchwork.ozlabs.org/series/1451/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/809802/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/809802/checks/","tags":{},"related":[],"headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xmLbH01gYz9t2V\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  5 Sep 2017 06:11:39 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1754717AbdIDULe (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 4 Sep 2017 16:11:34 -0400","from mail.us.es ([193.147.175.20]:42128 \"EHLO mail.us.es\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1754670AbdIDUL0 (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tMon, 4 Sep 2017 16:11:26 -0400","from antivirus1-rhel7.int (unknown [192.168.2.11])\n\tby mail.us.es (Postfix) with ESMTP id AD428532F8B\n\tfor <netdev@vger.kernel.org>; Mon,  4 Sep 2017 22:10:58 +0200 (CEST)","from antivirus1-rhel7.int (localhost [127.0.0.1])\n\tby antivirus1-rhel7.int (Postfix) with ESMTP id 9D1DF2133C\n\tfor <netdev@vger.kernel.org>; Mon,  4 Sep 2017 22:10:58 +0200 (CEST)","by antivirus1-rhel7.int (Postfix, from userid 99)\n\tid 910345CD; Mon,  4 Sep 2017 22:10:58 +0200 (CEST)","from antivirus1-rhel7.int (localhost [127.0.0.1])\n\tby antivirus1-rhel7.int (Postfix) with ESMTP id 2CB9FB5027;\n\tMon,  4 Sep 2017 22:10:56 +0200 (CEST)","from 192.168.1.97 (192.168.1.97) by antivirus1-rhel7.int\n\t(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int); \n\tMon, 04 Sep 2017 22:10:56 +0200 (CEST)","from salvia.here (129.166.216.87.static.jazztel.es\n\t[87.216.166.129]) (Authenticated sender: pneira@us.es)\n\tby entrada.int (Postfix) with ESMTPA id BB02E4265A22;\n\tMon,  4 Sep 2017 22:10:55 +0200 (CEST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.1 (2015-04-28) on\n\tantivirus1-rhel7.int","X-Spam-Level":"","X-Spam-Status":"No, score=-108.2 required=7.5 tests=ALL_TRUSTED,BAYES_50,\n\tSMTPAUTH_US2,USER_IN_WHITELIST autolearn=disabled version=3.4.1","X-Virus-Status":"clean(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int)","X-SMTPAUTHUS":"auth mail.us.es","From":"Pablo Neira Ayuso <pablo@netfilter.org>","To":"netfilter-devel@vger.kernel.org","Cc":"davem@davemloft.net, netdev@vger.kernel.org","Subject":"[PATCH 02/12] netfilter: nf_tables: add select_ops for stateful\n\tobjects","Date":"Mon,  4 Sep 2017 22:11:04 +0200","Message-Id":"<1504555874-4168-3-git-send-email-pablo@netfilter.org>","X-Mailer":"git-send-email 2.1.4","In-Reply-To":"<1504555874-4168-1-git-send-email-pablo@netfilter.org>","References":"<1504555874-4168-1-git-send-email-pablo@netfilter.org>","X-Virus-Scanned":"ClamAV using ClamSMTP","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"},"content":"From: \"Pablo M. Bermudo Garay\" <pablombg@gmail.com>\n\nThis patch adds support for overloading stateful objects operations\nthrough the select_ops() callback, just as it is implemented for\nexpressions.\n\nThis change is needed for upcoming additions to the stateful objects\ninfrastructure.\n\nSigned-off-by: Pablo M. Bermudo Garay <pablombg@gmail.com>\nSigned-off-by: Pablo Neira Ayuso <pablo@netfilter.org>\n---\n include/net/netfilter/nf_tables.h | 35 ++++++++++++++++++++++++-----------\n net/netfilter/nf_tables_api.c     | 36 ++++++++++++++++++++++++------------\n net/netfilter/nft_counter.c       | 20 +++++++++++++-------\n net/netfilter/nft_ct.c            | 18 ++++++++++++------\n net/netfilter/nft_objref.c        |  7 ++++---\n net/netfilter/nft_quota.c         | 20 +++++++++++++-------\n 6 files changed, 90 insertions(+), 46 deletions(-)","diff":"diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h\nindex f9795fe394f3..0f5b12a4ad09 100644\n--- a/include/net/netfilter/nf_tables.h\n+++ b/include/net/netfilter/nf_tables.h\n@@ -1007,12 +1007,12 @@ int nft_verdict_dump(struct sk_buff *skb, int type,\n  *\n  *\t@list: table stateful object list node\n  *\t@table: table this object belongs to\n- *\t@type: pointer to object type\n- *\t@data: pointer to object data\n  *\t@name: name of this stateful object\n  *\t@genmask: generation mask\n  *\t@use: number of references to this stateful object\n  * \t@data: object data, layout depends on type\n+ *\t@ops: object operations\n+ *\t@data: pointer to object data\n  */\n struct nft_object {\n \tstruct list_head\t\tlist;\n@@ -1021,7 +1021,7 @@ struct nft_object {\n \tu32\t\t\t\tgenmask:2,\n \t\t\t\t\tuse:30;\n \t/* runtime data below here */\n-\tconst struct nft_object_type\t*type ____cacheline_aligned;\n+\tconst struct nft_object_ops\t*ops ____cacheline_aligned;\n \tunsigned char\t\t\tdata[]\n \t\t__attribute__((aligned(__alignof__(u64))));\n };\n@@ -1044,27 +1044,39 @@ void nft_obj_notify(struct net *net, struct nft_table *table,\n /**\n  *\tstruct nft_object_type - stateful object type\n  *\n- *\t@eval: stateful object evaluation function\n+ *\t@select_ops: function to select nft_object_ops\n+ *\t@ops: default ops, used when no select_ops functions is present\n  *\t@list: list node in list of object types\n  *\t@type: stateful object numeric type\n- *\t@size: stateful object size\n  *\t@owner: module owner\n  *\t@maxattr: maximum netlink attribute\n  *\t@policy: netlink attribute policy\n+ */\n+struct nft_object_type {\n+\tconst struct nft_object_ops\t*(*select_ops)(const struct nft_ctx *,\n+\t\t\t\t\t\t       const struct nlattr * const tb[]);\n+\tconst struct nft_object_ops\t*ops;\n+\tstruct list_head\t\tlist;\n+\tu32\t\t\t\ttype;\n+\tunsigned int                    maxattr;\n+\tstruct module\t\t\t*owner;\n+\tconst struct nla_policy\t\t*policy;\n+};\n+\n+/**\n+ *\tstruct nft_object_ops - stateful object operations\n+ *\n+ *\t@eval: stateful object evaluation function\n+ *\t@size: stateful object size\n  *\t@init: initialize object from netlink attributes\n  *\t@destroy: release existing stateful object\n  *\t@dump: netlink dump stateful object\n  */\n-struct nft_object_type {\n+struct nft_object_ops {\n \tvoid\t\t\t\t(*eval)(struct nft_object *obj,\n \t\t\t\t\t\tstruct nft_regs *regs,\n \t\t\t\t\t\tconst struct nft_pktinfo *pkt);\n-\tstruct list_head\t\tlist;\n-\tu32\t\t\t\ttype;\n \tunsigned int\t\t\tsize;\n-\tunsigned int\t\t\tmaxattr;\n-\tstruct module\t\t\t*owner;\n-\tconst struct nla_policy\t\t*policy;\n \tint\t\t\t\t(*init)(const struct nft_ctx *ctx,\n \t\t\t\t\t\tconst struct nlattr *const tb[],\n \t\t\t\t\t\tstruct nft_object *obj);\n@@ -1072,6 +1084,7 @@ struct nft_object_type {\n \tint\t\t\t\t(*dump)(struct sk_buff *skb,\n \t\t\t\t\t\tstruct nft_object *obj,\n \t\t\t\t\t\tbool reset);\n+\tconst struct nft_object_type\t*type;\n };\n \n int nft_register_obj(struct nft_object_type *obj_type);\ndiff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c\nindex 149785ff1c7b..b37c178897f3 100644\n--- a/net/netfilter/nf_tables_api.c\n+++ b/net/netfilter/nf_tables_api.c\n@@ -4248,7 +4248,7 @@ struct nft_object *nf_tables_obj_lookup(const struct nft_table *table,\n \n \tlist_for_each_entry(obj, &table->objects, list) {\n \t\tif (!nla_strcmp(nla, obj->name) &&\n-\t\t    objtype == obj->type->type &&\n+\t\t    objtype == obj->ops->type->type &&\n \t\t    nft_active_genmask(obj, genmask))\n \t\t\treturn obj;\n \t}\n@@ -4270,6 +4270,7 @@ static struct nft_object *nft_obj_init(const struct nft_ctx *ctx,\n \t\t\t\t       const struct nlattr *attr)\n {\n \tstruct nlattr *tb[type->maxattr + 1];\n+\tconst struct nft_object_ops *ops;\n \tstruct nft_object *obj;\n \tint err;\n \n@@ -4282,16 +4283,27 @@ static struct nft_object *nft_obj_init(const struct nft_ctx *ctx,\n \t\tmemset(tb, 0, sizeof(tb[0]) * (type->maxattr + 1));\n \t}\n \n+\tif (type->select_ops) {\n+\t\tops = type->select_ops(ctx, (const struct nlattr * const *)tb);\n+\t\tif (IS_ERR(ops)) {\n+\t\t\terr = PTR_ERR(ops);\n+\t\t\tgoto err1;\n+\t\t}\n+\t} else {\n+\t\tops = type->ops;\n+\t}\n+\n \terr = -ENOMEM;\n-\tobj = kzalloc(sizeof(struct nft_object) + type->size, GFP_KERNEL);\n+\tobj = kzalloc(sizeof(*obj) + ops->size, GFP_KERNEL);\n \tif (obj == NULL)\n \t\tgoto err1;\n \n-\terr = type->init(ctx, (const struct nlattr * const *)tb, obj);\n+\terr = ops->init(ctx, (const struct nlattr * const *)tb, obj);\n \tif (err < 0)\n \t\tgoto err2;\n \n-\tobj->type = type;\n+\tobj->ops = ops;\n+\n \treturn obj;\n err2:\n \tkfree(obj);\n@@ -4307,7 +4319,7 @@ static int nft_object_dump(struct sk_buff *skb, unsigned int attr,\n \tnest = nla_nest_start(skb, attr);\n \tif (!nest)\n \t\tgoto nla_put_failure;\n-\tif (obj->type->dump(skb, obj, reset) < 0)\n+\tif (obj->ops->dump(skb, obj, reset) < 0)\n \t\tgoto nla_put_failure;\n \tnla_nest_end(skb, nest);\n \treturn 0;\n@@ -4418,8 +4430,8 @@ static int nf_tables_newobj(struct net *net, struct sock *nlsk,\n err3:\n \tkfree(obj->name);\n err2:\n-\tif (obj->type->destroy)\n-\t\tobj->type->destroy(obj);\n+\tif (obj->ops->destroy)\n+\t\tobj->ops->destroy(obj);\n \tkfree(obj);\n err1:\n \tmodule_put(type->owner);\n@@ -4446,7 +4458,7 @@ static int nf_tables_fill_obj_info(struct sk_buff *skb, struct net *net,\n \n \tif (nla_put_string(skb, NFTA_OBJ_TABLE, table->name) ||\n \t    nla_put_string(skb, NFTA_OBJ_NAME, obj->name) ||\n-\t    nla_put_be32(skb, NFTA_OBJ_TYPE, htonl(obj->type->type)) ||\n+\t    nla_put_be32(skb, NFTA_OBJ_TYPE, htonl(obj->ops->type->type)) ||\n \t    nla_put_be32(skb, NFTA_OBJ_USE, htonl(obj->use)) ||\n \t    nft_object_dump(skb, NFTA_OBJ_DATA, obj, reset))\n \t\tgoto nla_put_failure;\n@@ -4500,7 +4512,7 @@ static int nf_tables_dump_obj(struct sk_buff *skb, struct netlink_callback *cb)\n \t\t\t\t\tgoto cont;\n \t\t\t\tif (filter &&\n \t\t\t\t    filter->type != NFT_OBJECT_UNSPEC &&\n-\t\t\t\t    obj->type->type != filter->type)\n+\t\t\t\t    obj->ops->type->type != filter->type)\n \t\t\t\t\tgoto cont;\n \n \t\t\t\tif (nf_tables_fill_obj_info(skb, net, NETLINK_CB(cb->skb).portid,\n@@ -4628,10 +4640,10 @@ static int nf_tables_getobj(struct net *net, struct sock *nlsk,\n \n static void nft_obj_destroy(struct nft_object *obj)\n {\n-\tif (obj->type->destroy)\n-\t\tobj->type->destroy(obj);\n+\tif (obj->ops->destroy)\n+\t\tobj->ops->destroy(obj);\n \n-\tmodule_put(obj->type->owner);\n+\tmodule_put(obj->ops->type->owner);\n \tkfree(obj->name);\n \tkfree(obj);\n }\ndiff --git a/net/netfilter/nft_counter.c b/net/netfilter/nft_counter.c\nindex 67a710ebde09..eefe3b409925 100644\n--- a/net/netfilter/nft_counter.c\n+++ b/net/netfilter/nft_counter.c\n@@ -175,15 +175,21 @@ static const struct nla_policy nft_counter_policy[NFTA_COUNTER_MAX + 1] = {\n \t[NFTA_COUNTER_BYTES]\t= { .type = NLA_U64 },\n };\n \n-static struct nft_object_type nft_counter_obj __read_mostly = {\n-\t.type\t\t= NFT_OBJECT_COUNTER,\n+static struct nft_object_type nft_counter_obj_type;\n+static const struct nft_object_ops nft_counter_obj_ops = {\n+\t.type\t\t= &nft_counter_obj_type,\n \t.size\t\t= sizeof(struct nft_counter_percpu_priv),\n-\t.maxattr\t= NFTA_COUNTER_MAX,\n-\t.policy\t\t= nft_counter_policy,\n \t.eval\t\t= nft_counter_obj_eval,\n \t.init\t\t= nft_counter_obj_init,\n \t.destroy\t= nft_counter_obj_destroy,\n \t.dump\t\t= nft_counter_obj_dump,\n+};\n+\n+static struct nft_object_type nft_counter_obj_type __read_mostly = {\n+\t.type\t\t= NFT_OBJECT_COUNTER,\n+\t.ops\t\t= &nft_counter_obj_ops,\n+\t.maxattr\t= NFTA_COUNTER_MAX,\n+\t.policy\t\t= nft_counter_policy,\n \t.owner\t\t= THIS_MODULE,\n };\n \n@@ -271,7 +277,7 @@ static int __init nft_counter_module_init(void)\n \tfor_each_possible_cpu(cpu)\n \t\tseqcount_init(per_cpu_ptr(&nft_counter_seq, cpu));\n \n-\terr = nft_register_obj(&nft_counter_obj);\n+\terr = nft_register_obj(&nft_counter_obj_type);\n \tif (err < 0)\n \t\treturn err;\n \n@@ -281,14 +287,14 @@ static int __init nft_counter_module_init(void)\n \n \treturn 0;\n err1:\n-\tnft_unregister_obj(&nft_counter_obj);\n+\tnft_unregister_obj(&nft_counter_obj_type);\n \treturn err;\n }\n \n static void __exit nft_counter_module_exit(void)\n {\n \tnft_unregister_expr(&nft_counter_type);\n-\tnft_unregister_obj(&nft_counter_obj);\n+\tnft_unregister_obj(&nft_counter_obj_type);\n }\n \n module_init(nft_counter_module_init);\ndiff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c\nindex 1678e9e75e8e..bd0975d7dd6f 100644\n--- a/net/netfilter/nft_ct.c\n+++ b/net/netfilter/nft_ct.c\n@@ -904,15 +904,21 @@ static const struct nla_policy nft_ct_helper_policy[NFTA_CT_HELPER_MAX + 1] = {\n \t[NFTA_CT_HELPER_L4PROTO] = { .type = NLA_U8 },\n };\n \n-static struct nft_object_type nft_ct_helper_obj __read_mostly = {\n-\t.type\t\t= NFT_OBJECT_CT_HELPER,\n+static struct nft_object_type nft_ct_helper_obj_type;\n+static const struct nft_object_ops nft_ct_helper_obj_ops = {\n+\t.type\t\t= &nft_ct_helper_obj_type,\n \t.size\t\t= sizeof(struct nft_ct_helper_obj),\n-\t.maxattr\t= NFTA_CT_HELPER_MAX,\n-\t.policy\t\t= nft_ct_helper_policy,\n \t.eval\t\t= nft_ct_helper_obj_eval,\n \t.init\t\t= nft_ct_helper_obj_init,\n \t.destroy\t= nft_ct_helper_obj_destroy,\n \t.dump\t\t= nft_ct_helper_obj_dump,\n+};\n+\n+static struct nft_object_type nft_ct_helper_obj_type __read_mostly = {\n+\t.type\t\t= NFT_OBJECT_CT_HELPER,\n+\t.ops\t\t= &nft_ct_helper_obj_ops,\n+\t.maxattr\t= NFTA_CT_HELPER_MAX,\n+\t.policy\t\t= nft_ct_helper_policy,\n \t.owner\t\t= THIS_MODULE,\n };\n \n@@ -930,7 +936,7 @@ static int __init nft_ct_module_init(void)\n \tif (err < 0)\n \t\tgoto err1;\n \n-\terr = nft_register_obj(&nft_ct_helper_obj);\n+\terr = nft_register_obj(&nft_ct_helper_obj_type);\n \tif (err < 0)\n \t\tgoto err2;\n \n@@ -945,7 +951,7 @@ static int __init nft_ct_module_init(void)\n \n static void __exit nft_ct_module_exit(void)\n {\n-\tnft_unregister_obj(&nft_ct_helper_obj);\n+\tnft_unregister_obj(&nft_ct_helper_obj_type);\n \tnft_unregister_expr(&nft_notrack_type);\n \tnft_unregister_expr(&nft_ct_type);\n }\ndiff --git a/net/netfilter/nft_objref.c b/net/netfilter/nft_objref.c\nindex 1dd428fbaaa3..7bcdc48f3d73 100644\n--- a/net/netfilter/nft_objref.c\n+++ b/net/netfilter/nft_objref.c\n@@ -22,7 +22,7 @@ static void nft_objref_eval(const struct nft_expr *expr,\n {\n \tstruct nft_object *obj = nft_objref_priv(expr);\n \n-\tobj->type->eval(obj, regs, pkt);\n+\tobj->ops->eval(obj, regs, pkt);\n }\n \n static int nft_objref_init(const struct nft_ctx *ctx,\n@@ -54,7 +54,8 @@ static int nft_objref_dump(struct sk_buff *skb, const struct nft_expr *expr)\n \tconst struct nft_object *obj = nft_objref_priv(expr);\n \n \tif (nla_put_string(skb, NFTA_OBJREF_IMM_NAME, obj->name) ||\n-\t    nla_put_be32(skb, NFTA_OBJREF_IMM_TYPE, htonl(obj->type->type)))\n+\t    nla_put_be32(skb, NFTA_OBJREF_IMM_TYPE,\n+\t\t\t htonl(obj->ops->type->type)))\n \t\tgoto nla_put_failure;\n \n \treturn 0;\n@@ -104,7 +105,7 @@ static void nft_objref_map_eval(const struct nft_expr *expr,\n \t\treturn;\n \t}\n \tobj = *nft_set_ext_obj(ext);\n-\tobj->type->eval(obj, regs, pkt);\n+\tobj->ops->eval(obj, regs, pkt);\n }\n \n static int nft_objref_map_init(const struct nft_ctx *ctx,\ndiff --git a/net/netfilter/nft_quota.c b/net/netfilter/nft_quota.c\nindex 25e33159be57..0ed124a93fcf 100644\n--- a/net/netfilter/nft_quota.c\n+++ b/net/netfilter/nft_quota.c\n@@ -151,14 +151,20 @@ static int nft_quota_obj_dump(struct sk_buff *skb, struct nft_object *obj,\n \treturn nft_quota_do_dump(skb, priv, reset);\n }\n \n-static struct nft_object_type nft_quota_obj __read_mostly = {\n-\t.type\t\t= NFT_OBJECT_QUOTA,\n+static struct nft_object_type nft_quota_obj_type;\n+static const struct nft_object_ops nft_quota_obj_ops = {\n+\t.type\t\t= &nft_quota_obj_type,\n \t.size\t\t= sizeof(struct nft_quota),\n-\t.maxattr\t= NFTA_QUOTA_MAX,\n-\t.policy\t\t= nft_quota_policy,\n \t.init\t\t= nft_quota_obj_init,\n \t.eval\t\t= nft_quota_obj_eval,\n \t.dump\t\t= nft_quota_obj_dump,\n+};\n+\n+static struct nft_object_type nft_quota_obj_type __read_mostly = {\n+\t.type\t\t= NFT_OBJECT_QUOTA,\n+\t.ops\t\t= &nft_quota_obj_ops,\n+\t.maxattr\t= NFTA_QUOTA_MAX,\n+\t.policy\t\t= nft_quota_policy,\n \t.owner\t\t= THIS_MODULE,\n };\n \n@@ -209,7 +215,7 @@ static int __init nft_quota_module_init(void)\n {\n \tint err;\n \n-\terr = nft_register_obj(&nft_quota_obj);\n+\terr = nft_register_obj(&nft_quota_obj_type);\n \tif (err < 0)\n \t\treturn err;\n \n@@ -219,14 +225,14 @@ static int __init nft_quota_module_init(void)\n \n \treturn 0;\n err1:\n-\tnft_unregister_obj(&nft_quota_obj);\n+\tnft_unregister_obj(&nft_quota_obj_type);\n \treturn err;\n }\n \n static void __exit nft_quota_module_exit(void)\n {\n \tnft_unregister_expr(&nft_quota_type);\n-\tnft_unregister_obj(&nft_quota_obj);\n+\tnft_unregister_obj(&nft_quota_obj_type);\n }\n \n module_init(nft_quota_module_init);\n","prefixes":["02/12"]}