From: kernel test robot <lkp@intel.com>
To: Florian Westphal <fw@strlen.de>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH nf-next 3/9] netfilter: nf_tables: add lockdep assertion for chain use counter
Date: Sun, 10 Mar 2024 00:44:09 +0800 [thread overview]
Message-ID: <202403100012.wf5Caqtz-lkp@intel.com> (raw)
In-Reply-To: <20240307084018.2219-4-fw@strlen.de>
Hi Florian,
kernel test robot noticed the following build warnings:
[auto build test WARNING on next-20240307]
[also build test WARNING on linus/master v6.8-rc7]
[cannot apply to nf-next/master netfilter-nf/main v6.8-rc7 v6.8-rc6 v6.8-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Florian-Westphal/netfilter-nf_tables-warn-if-set-being-destroyed-is-still-active/20240307-171729
base: next-20240307
patch link: https://lore.kernel.org/r/20240307084018.2219-4-fw%40strlen.de
patch subject: [PATCH nf-next 3/9] netfilter: nf_tables: add lockdep assertion for chain use counter
config: s390-defconfig (https://download.01.org/0day-ci/archive/20240310/202403100012.wf5Caqtz-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 503c55e17037436dcd45ac69dea8967e67e3f5e8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240310/202403100012.wf5Caqtz-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403100012.wf5Caqtz-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> net/netfilter/nf_tables_api.c:6423: warning: Function parameter or struct member 'elem_priv' not described in 'nft_set_elem_destroy'
>> net/netfilter/nf_tables_api.c:6423: warning: Excess function parameter 'elem' description in 'nft_set_elem_destroy'
vim +6423 net/netfilter/nf_tables_api.c
563125a73ac30d Pablo Neira Ayuso 2020-12-09 6406
60cf9e02aac6c9 Florian Westphal 2024-03-07 6407 /**
60cf9e02aac6c9 Florian Westphal 2024-03-07 6408 * nft_set_elem_destroy - free a set element instantly
60cf9e02aac6c9 Florian Westphal 2024-03-07 6409 * @set: the set the element was supposed to be added to
60cf9e02aac6c9 Florian Westphal 2024-03-07 6410 * @elem: the private element pointer to be free'd
60cf9e02aac6c9 Florian Westphal 2024-03-07 6411 * @destroy_expr: true if embedded expression was initialised before
60cf9e02aac6c9 Florian Westphal 2024-03-07 6412 *
60cf9e02aac6c9 Florian Westphal 2024-03-07 6413 * Immediately releases an element without going through any synchronization.
60cf9e02aac6c9 Florian Westphal 2024-03-07 6414 * This function can only be used for error unwinding BEFORE the element was
60cf9e02aac6c9 Florian Westphal 2024-03-07 6415 * added to the set, else concurrent data path access may result in
60cf9e02aac6c9 Florian Westphal 2024-03-07 6416 * use-after-free.
60cf9e02aac6c9 Florian Westphal 2024-03-07 6417 * For datapath error unwinding, jumps-to-chain or objref are
60cf9e02aac6c9 Florian Westphal 2024-03-07 6418 * not supported.
60cf9e02aac6c9 Florian Westphal 2024-03-07 6419 */
9dad402b89e81a Pablo Neira Ayuso 2023-10-18 6420 void nft_set_elem_destroy(const struct nft_set *set,
9dad402b89e81a Pablo Neira Ayuso 2023-10-18 6421 const struct nft_elem_priv *elem_priv,
61f9e2924f4981 Liping Zhang 2016-10-22 6422 bool destroy_expr)
61edafbb47e9f4 Patrick McHardy 2015-03-25 @6423 {
9dad402b89e81a Pablo Neira Ayuso 2023-10-18 6424 struct nft_set_ext *ext = nft_set_elem_ext(set, elem_priv);
3453c92731884b Pablo Neira Ayuso 2018-06-02 6425 struct nft_ctx ctx = {
3453c92731884b Pablo Neira Ayuso 2018-06-02 6426 .net = read_pnet(&set->net),
3453c92731884b Pablo Neira Ayuso 2018-06-02 6427 .family = set->table->family,
3453c92731884b Pablo Neira Ayuso 2018-06-02 6428 };
61edafbb47e9f4 Patrick McHardy 2015-03-25 6429
60cf9e02aac6c9 Florian Westphal 2024-03-07 6430 /* We can only do error unwind for vmaps or objref types
60cf9e02aac6c9 Florian Westphal 2024-03-07 6431 * if the caller is holding the transaction mutex.
60cf9e02aac6c9 Florian Westphal 2024-03-07 6432 */
60cf9e02aac6c9 Florian Westphal 2024-03-07 6433 if (set->dtype == NFT_DATA_VERDICT ||
60cf9e02aac6c9 Florian Westphal 2024-03-07 6434 nft_set_ext_exists(ext, NFT_SET_EXT_OBJREF))
60cf9e02aac6c9 Florian Westphal 2024-03-07 6435 WARN_ON_ONCE(!lockdep_commit_lock_is_held(read_pnet(&set->net)));
60cf9e02aac6c9 Florian Westphal 2024-03-07 6436
591054469b3eef Pablo Neira Ayuso 2017-05-15 6437 nft_data_release(nft_set_ext_key(ext), NFT_DATA_VALUE);
61edafbb47e9f4 Patrick McHardy 2015-03-25 6438 if (nft_set_ext_exists(ext, NFT_SET_EXT_DATA))
591054469b3eef Pablo Neira Ayuso 2017-05-15 6439 nft_data_release(nft_set_ext_data(ext), set->dtype);
563125a73ac30d Pablo Neira Ayuso 2020-12-09 6440 if (destroy_expr && nft_set_ext_exists(ext, NFT_SET_EXT_EXPRESSIONS))
475beb9c8de122 Pablo Neira Ayuso 2020-03-18 6441 nft_set_elem_expr_destroy(&ctx, nft_set_ext_expr(ext));
8aeff920dcc9b3 Pablo Neira Ayuso 2016-11-28 6442 if (nft_set_ext_exists(ext, NFT_SET_EXT_OBJREF))
1689f25924ada8 Pablo Neira Ayuso 2023-06-28 6443 nft_use_dec(&(*nft_set_ext_obj(ext))->use);
9dad402b89e81a Pablo Neira Ayuso 2023-10-18 6444
9dad402b89e81a Pablo Neira Ayuso 2023-10-18 6445 kfree(elem_priv);
61edafbb47e9f4 Patrick McHardy 2015-03-25 6446 }
61edafbb47e9f4 Patrick McHardy 2015-03-25 6447 EXPORT_SYMBOL_GPL(nft_set_elem_destroy);
61edafbb47e9f4 Patrick McHardy 2015-03-25 6448
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2024-03-09 16:44 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20240307084018.2219-4-fw@strlen.de>]
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=202403100012.wf5Caqtz-lkp@intel.com \
--to=lkp@intel.com \
--cc=fw@strlen.de \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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).