public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: kbuild test robot <lkp@intel.com>
Cc: Lai Jiangshan <laijs@linux.alibaba.com>,
	kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: Re: [rcu:dev.2020.02.15b 33/33] kernel/rcu/tree_plugin.h:396:2: error: expected identifier or '(' before 'if'
Date: Tue, 18 Feb 2020 05:44:57 -0800	[thread overview]
Message-ID: <20200218134457.GC2935@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <202002181731.hrgvGnlt%lkp@intel.com>

On Tue, Feb 18, 2020 at 05:06:32PM +0800, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2020.02.15b
> head:   163cebf16e83ee2e6494976e396ab1a8f8aa9b17
> commit: 163cebf16e83ee2e6494976e396ab1a8f8aa9b17 [33/33] rcu: Don't use negative nesting depth in __rcu_read_unlock()
> config: nds32-defconfig (attached as .config)
> compiler: nds32le-linux-gcc (GCC) 9.2.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout 163cebf16e83ee2e6494976e396ab1a8f8aa9b17
>         # save the attached .config to linux build tree
>         GCC_VERSION=9.2.0 make.cross ARCH=nds32 
> 
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from kernel/rcu/tree.c:4030:
> >> kernel/rcu/tree_plugin.h:396:2: error: expected identifier or '(' before 'if'
>      396 |  if (IS_ENABLED(CONFIG_PROVE_LOCKING)) {
>          |  ^~
> >> kernel/rcu/tree_plugin.h:401:1: error: expected identifier or '(' before '}' token
>      401 | }
>          | ^

This has since been fixed by a new version 756b5aea6df6 ("rcu: Don't use
negative nesting depth in __rcu_read_unlock()") in -rcu.

							Thanx, Paul

> vim +396 kernel/rcu/tree_plugin.h
> 
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  379  
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  380  /*
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  381   * Preemptible RCU implementation for rcu_read_unlock().
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  382   * Decrement ->rcu_read_lock_nesting.  If the result is zero (outermost
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  383   * rcu_read_unlock()) and ->rcu_read_unlock_special is non-zero, then
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  384   * invoke rcu_read_unlock_special() to clean up after a context switch
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  385   * in an RCU read-side critical section and other special cases.
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  386   */
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  387  void __rcu_read_unlock(void)
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  388  {
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  389  	struct task_struct *t = current;
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  390  
> 163cebf16e83ee Lai Jiangshan    2020-02-15  391  	if (rcu_preempt_read_exit() == 0)
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  392  		barrier();  /* critical section before exit code. */
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  393  		if (unlikely(READ_ONCE(t->rcu_read_unlock_special.s)))
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  394  			rcu_read_unlock_special(t);
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  395  	}
> 5f1a6ef3746f53 Paul E. McKenney 2018-10-29 @396  	if (IS_ENABLED(CONFIG_PROVE_LOCKING)) {
> 77339e61aa3093 Lai Jiangshan    2019-11-15  397  		int rrln = rcu_preempt_depth();
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  398  
> 5f1a6ef3746f53 Paul E. McKenney 2018-10-29  399  		WARN_ON_ONCE(rrln < 0 && rrln > RCU_NEST_NMAX);
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  400  	}
> 0e5da22e3f809a Paul E. McKenney 2018-03-19 @401  }
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  402  EXPORT_SYMBOL_GPL(__rcu_read_unlock);
> 0e5da22e3f809a Paul E. McKenney 2018-03-19  403  
> 
> :::::: The code at line 396 was first introduced by commit
> :::::: 5f1a6ef3746f536157922197d98676fa21154549 rcu: Avoid signed integer overflow in rcu_preempt_deferred_qs()
> 
> :::::: TO: Paul E. McKenney <paulmck@linux.ibm.com>
> :::::: CC: Paul E. McKenney <paulmck@linux.ibm.com>
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



      reply	other threads:[~2020-02-18 13:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18  9:06 [rcu:dev.2020.02.15b 33/33] kernel/rcu/tree_plugin.h:396:2: error: expected identifier or '(' before 'if' kbuild test robot
2020-02-18 13:44 ` Paul E. McKenney [this message]

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=20200218134457.GC2935@paulmck-ThinkPad-P72 \
    --to=paulmck@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=laijs@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    /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