public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [rcu:dev.2020.02.15b 33/33] kernel/rcu/tree_plugin.h:396:2: error: expected identifier or '(' before 'if'
@ 2020-02-18  9:06 kbuild test robot
  2020-02-18 13:44 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2020-02-18  9:06 UTC (permalink / raw)
  To: Lai Jiangshan; +Cc: kbuild-all, linux-kernel, Paul E. McKenney

[-- Attachment #1: Type: text/plain, Size: 3521 bytes --]

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 | }
         | ^

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 10821 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [rcu:dev.2020.02.15b 33/33] kernel/rcu/tree_plugin.h:396:2: error: expected identifier or '(' before 'if'
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2020-02-18 13:44 UTC (permalink / raw)
  To: kbuild test robot; +Cc: Lai Jiangshan, kbuild-all, linux-kernel

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-18 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox