llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH nf-next 3/9] netfilter: nf_tables: add lockdep assertion for chain use counter
       [not found] <20240307084018.2219-4-fw@strlen.de>
@ 2024-03-09 16:44 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-03-09 16:44 UTC (permalink / raw)
  To: Florian Westphal; +Cc: llvm, oe-kbuild-all

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-09 16:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20240307084018.2219-4-fw@strlen.de>
2024-03-09 16:44 ` [PATCH nf-next 3/9] netfilter: nf_tables: add lockdep assertion for chain use counter kernel test robot

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).