From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>,
changlongx.xie@intel.com, fengguang.wu@intel.com,
netfilter-devel@vger.kernel.org
Subject: [nf-next:nf_tables-experiments 19/19] net/netfilter/nf_tables_api.c:718 nf_tables_newchain() info: why not propagate 'type' from nf_tables_chain_type_lookup() instead of -2?
Date: Tue, 6 Nov 2012 10:41:06 +0800 [thread overview]
Message-ID: <20121106024106.GP16883@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <50982648.6QMp7+ZwwPGArwHD%yuanhan.liu@linux.intel.com>
Hi Pablo,
Just FYI, there are new _smatch_ warnings show up in
tree: git://150.214.188.80/nf-next nf_tables-experiments
head: 4581c95a751df71f77861c95f3b34882c37bb2fe
commit: 4581c95a751df71f77861c95f3b34882c37bb2fe [19/19] netfilter: nf_tables: replace built-in tables by chain types
+ net/netfilter/nf_tables_api.c:718 nf_tables_newchain() info: why not propagate 'type' from nf_tables_chain_type_lookup() instead of -2?
net/netfilter/nf_tables_api.c:1263 nf_tables_newrule() warn: 'info' puts 864 bytes on stack
vim +718 +/type net/netfilter/nf_tables_api.c
89459d9e Pablo Neira Ayuso 2012-10-01 702 nla[NFTA_CHAIN_POLICY]);
89459d9e Pablo Neira Ayuso 2012-10-01 703 }
a6332633 Pablo Neira Ayuso 2012-09-16 704 return 0;
a6332633 Pablo Neira Ayuso 2012-09-16 705 }
a6332633 Pablo Neira Ayuso 2012-09-16 706
a6332633 Pablo Neira Ayuso 2012-09-16 707 if (nla[NFTA_CHAIN_HOOK]) {
a6332633 Pablo Neira Ayuso 2012-09-16 708 struct nf_hook_ops *ops;
4581c95a Pablo Neira Ayuso 2012-11-05 709 nf_hookfn *hookfn;
4581c95a Pablo Neira Ayuso 2012-11-05 710 u32 hooknum;
4581c95a Pablo Neira Ayuso 2012-11-05 711 int type = NFT_CHAIN_T_DEFAULT;
4581c95a Pablo Neira Ayuso 2012-11-05 712
4581c95a Pablo Neira Ayuso 2012-11-05 713 if (nla[NFTA_CHAIN_TYPE]) {
4581c95a Pablo Neira Ayuso 2012-11-05 714 type = nf_tables_chain_type_lookup(afi,
4581c95a Pablo Neira Ayuso 2012-11-05 715 nla[NFTA_CHAIN_TYPE],
4581c95a Pablo Neira Ayuso 2012-11-05 716 create);
4581c95a Pablo Neira Ayuso 2012-11-05 717 if (type < 0)
4581c95a Pablo Neira Ayuso 2012-11-05 @718 return -ENOENT;
4581c95a Pablo Neira Ayuso 2012-11-05 719 }
a6332633 Pablo Neira Ayuso 2012-09-16 720
a6332633 Pablo Neira Ayuso 2012-09-16 721 err = nla_parse_nested(ha, NFTA_HOOK_MAX, nla[NFTA_CHAIN_HOOK],
a6332633 Pablo Neira Ayuso 2012-09-16 722 nft_hook_policy);
a6332633 Pablo Neira Ayuso 2012-09-16 723 if (err < 0)
a6332633 Pablo Neira Ayuso 2012-09-16 724 return err;
a6332633 Pablo Neira Ayuso 2012-09-16 725 if (ha[NFTA_HOOK_HOOKNUM] == NULL ||
a6332633 Pablo Neira Ayuso 2012-09-16 726 ha[NFTA_HOOK_PRIORITY] == NULL)
---
0-DAY kernel build testing backend Open Source Technology Center
Fengguang Wu, Yuanhan Liu Intel Corporation
parent reply other threads:[~2012-11-06 2:41 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <50982648.6QMp7+ZwwPGArwHD%yuanhan.liu@linux.intel.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121106024106.GP16883@yliu-dev.sh.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=changlongx.xie@intel.com \
--cc=fengguang.wu@intel.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).