rcu.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rculist: Fix _list_check_srcu() macro
@ 2020-07-13 17:48 madhuparnabhowmik10
  2020-07-13 21:02 ` Paul E. McKenney
  2020-07-14  2:37 ` kernel test robot
  0 siblings, 2 replies; 6+ messages in thread
From: madhuparnabhowmik10 @ 2020-07-13 17:48 UTC (permalink / raw)
  To: paulmck; +Cc: joel, rcu, linux-kernel, Madhuparna Bhowmik

From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>

This patch fixes the macro _list_check_srcu() for CONFIG_PROVE_RCU_LIST =
False.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
---
 include/linux/rculist.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index 516b4feb2682..a435ad62b90b 100644
--- a/include/linux/rculist.h
+++ b/include/linux/rculist.h
@@ -73,7 +73,7 @@ static inline void INIT_LIST_HEAD_RCU(struct list_head *list)
 #define __list_check_rcu(dummy, cond, extra...)				\
 	({ check_arg_count_one(extra); })
 
-#define __list_check_srcu(cond)
+#define __list_check_srcu(cond)	TRUE
 #endif
 
 /*
-- 
2.17.1


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

* Re: [PATCH] rculist: Fix _list_check_srcu() macro
  2020-07-13 17:48 [PATCH] rculist: Fix _list_check_srcu() macro madhuparnabhowmik10
@ 2020-07-13 21:02 ` Paul E. McKenney
  2020-07-13 21:13   ` Madhuparna Bhowmik
  2020-07-14  2:37 ` kernel test robot
  1 sibling, 1 reply; 6+ messages in thread
From: Paul E. McKenney @ 2020-07-13 21:02 UTC (permalink / raw)
  To: madhuparnabhowmik10; +Cc: joel, rcu, linux-kernel

On Mon, Jul 13, 2020 at 11:18:46PM +0530, madhuparnabhowmik10@gmail.com wrote:
> From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
> 
> This patch fixes the macro _list_check_srcu() for CONFIG_PROVE_RCU_LIST =
> False.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>

Thank you, Madhuparna!  I am folding this into your original, but
with lowercase "true".

							Thanx, Paul

> ---
>  include/linux/rculist.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/rculist.h b/include/linux/rculist.h
> index 516b4feb2682..a435ad62b90b 100644
> --- a/include/linux/rculist.h
> +++ b/include/linux/rculist.h
> @@ -73,7 +73,7 @@ static inline void INIT_LIST_HEAD_RCU(struct list_head *list)
>  #define __list_check_rcu(dummy, cond, extra...)				\
>  	({ check_arg_count_one(extra); })
>  
> -#define __list_check_srcu(cond)
> +#define __list_check_srcu(cond)	TRUE
>  #endif
>  
>  /*
> -- 
> 2.17.1
> 

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

* Re: [PATCH] rculist: Fix _list_check_srcu() macro
  2020-07-13 21:02 ` Paul E. McKenney
@ 2020-07-13 21:13   ` Madhuparna Bhowmik
  2020-07-13 21:26     ` Paul E. McKenney
  0 siblings, 1 reply; 6+ messages in thread
From: Madhuparna Bhowmik @ 2020-07-13 21:13 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: madhuparnabhowmik10, joel, rcu, linux-kernel

On Mon, Jul 13, 2020 at 02:02:44PM -0700, Paul E. McKenney wrote:
> On Mon, Jul 13, 2020 at 11:18:46PM +0530, madhuparnabhowmik10@gmail.com wrote:
> > From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
> > 
> > This patch fixes the macro _list_check_srcu() for CONFIG_PROVE_RCU_LIST =
> > False.
> > 
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
> 
> Thank you, Madhuparna!  I am folding this into your original, but
> with lowercase "true".
>
I am really sorry and thanks for applying this with the correction.

Regards,
Madhuparna
> 							Thanx, Paul
> 
> > ---
> >  include/linux/rculist.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/include/linux/rculist.h b/include/linux/rculist.h
> > index 516b4feb2682..a435ad62b90b 100644
> > --- a/include/linux/rculist.h
> > +++ b/include/linux/rculist.h
> > @@ -73,7 +73,7 @@ static inline void INIT_LIST_HEAD_RCU(struct list_head *list)
> >  #define __list_check_rcu(dummy, cond, extra...)				\
> >  	({ check_arg_count_one(extra); })
> >  
> > -#define __list_check_srcu(cond)
> > +#define __list_check_srcu(cond)	TRUE
> >  #endif
> >  
> >  /*
> > -- 
> > 2.17.1
> > 

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

* Re: [PATCH] rculist: Fix _list_check_srcu() macro
  2020-07-13 21:13   ` Madhuparna Bhowmik
@ 2020-07-13 21:26     ` Paul E. McKenney
  2020-07-13 23:40       ` Madhuparna Bhowmik
  0 siblings, 1 reply; 6+ messages in thread
From: Paul E. McKenney @ 2020-07-13 21:26 UTC (permalink / raw)
  To: Madhuparna Bhowmik; +Cc: joel, rcu, linux-kernel

On Tue, Jul 14, 2020 at 02:43:16AM +0530, Madhuparna Bhowmik wrote:
> On Mon, Jul 13, 2020 at 02:02:44PM -0700, Paul E. McKenney wrote:
> > On Mon, Jul 13, 2020 at 11:18:46PM +0530, madhuparnabhowmik10@gmail.com wrote:
> > > From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
> > > 
> > > This patch fixes the macro _list_check_srcu() for CONFIG_PROVE_RCU_LIST =
> > > False.
> > > 
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
> > 
> > Thank you, Madhuparna!  I am folding this into your original, but
> > with lowercase "true".
> >
> I am really sorry and thanks for applying this with the correction.

No worries!  Just thought that I should mention it in case there was
some subtle reason why TRUE was needed in this case.  ;-)

							Thanx, Paul

> > > ---
> > >  include/linux/rculist.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/include/linux/rculist.h b/include/linux/rculist.h
> > > index 516b4feb2682..a435ad62b90b 100644
> > > --- a/include/linux/rculist.h
> > > +++ b/include/linux/rculist.h
> > > @@ -73,7 +73,7 @@ static inline void INIT_LIST_HEAD_RCU(struct list_head *list)
> > >  #define __list_check_rcu(dummy, cond, extra...)				\
> > >  	({ check_arg_count_one(extra); })
> > >  
> > > -#define __list_check_srcu(cond)
> > > +#define __list_check_srcu(cond)	TRUE
> > >  #endif
> > >  
> > >  /*
> > > -- 
> > > 2.17.1
> > > 

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

* Re: [PATCH] rculist: Fix _list_check_srcu() macro
  2020-07-13 21:26     ` Paul E. McKenney
@ 2020-07-13 23:40       ` Madhuparna Bhowmik
  0 siblings, 0 replies; 6+ messages in thread
From: Madhuparna Bhowmik @ 2020-07-13 23:40 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: Madhuparna Bhowmik, joel, rcu, linux-kernel

On Mon, Jul 13, 2020 at 02:26:24PM -0700, Paul E. McKenney wrote:
> On Tue, Jul 14, 2020 at 02:43:16AM +0530, Madhuparna Bhowmik wrote:
> > On Mon, Jul 13, 2020 at 02:02:44PM -0700, Paul E. McKenney wrote:
> > > On Mon, Jul 13, 2020 at 11:18:46PM +0530, madhuparnabhowmik10@gmail.com wrote:
> > > > From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
> > > > 
> > > > This patch fixes the macro _list_check_srcu() for CONFIG_PROVE_RCU_LIST =
> > > > False.
> > > > 
> > > > Reported-by: kernel test robot <lkp@intel.com>
> > > > Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
> > > 
> > > Thank you, Madhuparna!  I am folding this into your original, but
> > > with lowercase "true".
> > >
> > I am really sorry and thanks for applying this with the correction.
> 
> No worries!  Just thought that I should mention it in case there was
> some subtle reason why TRUE was needed in this case.  ;-)
>
No, it was just a mistake.

Thanks,
Madhuparna

> 							Thanx, Paul
> 
> > > > ---
> > > >  include/linux/rculist.h | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/include/linux/rculist.h b/include/linux/rculist.h
> > > > index 516b4feb2682..a435ad62b90b 100644
> > > > --- a/include/linux/rculist.h
> > > > +++ b/include/linux/rculist.h
> > > > @@ -73,7 +73,7 @@ static inline void INIT_LIST_HEAD_RCU(struct list_head *list)
> > > >  #define __list_check_rcu(dummy, cond, extra...)				\
> > > >  	({ check_arg_count_one(extra); })
> > > >  
> > > > -#define __list_check_srcu(cond)
> > > > +#define __list_check_srcu(cond)	TRUE
> > > >  #endif
> > > >  
> > > >  /*
> > > > -- 
> > > > 2.17.1
> > > > 

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

* Re: [PATCH] rculist: Fix _list_check_srcu() macro
  2020-07-13 17:48 [PATCH] rculist: Fix _list_check_srcu() macro madhuparnabhowmik10
  2020-07-13 21:02 ` Paul E. McKenney
@ 2020-07-14  2:37 ` kernel test robot
  1 sibling, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-07-14  2:37 UTC (permalink / raw)
  To: madhuparnabhowmik10, paulmck
  Cc: kbuild-all, joel, rcu, linux-kernel, Madhuparna Bhowmik

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

Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on rcu/dev]
[cannot apply to v5.8-rc5 next-20200713]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/madhuparnabhowmik10-gmail-com/rculist-Fix-_list_check_srcu-macro/20200714-015126
base:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/kvm_host.h:12,
                    from arch/x86/kvm/mmu/page_track.c:14:
   arch/x86/kvm/mmu/page_track.c: In function 'kvm_page_track_write':
>> include/linux/rculist.h:76:33: error: 'TRUE' undeclared (first use in this function)
      76 | #define __list_check_srcu(cond) TRUE
         |                                 ^~~~
   include/linux/rculist.h:727:7: note: in expansion of macro '__list_check_srcu'
     727 |  for (__list_check_srcu(cond),     \
         |       ^~~~~~~~~~~~~~~~~
   arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
     232 |  hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rculist.h:76:33: note: each undeclared identifier is reported only once for each function it appears in
      76 | #define __list_check_srcu(cond) TRUE
         |                                 ^~~~
   include/linux/rculist.h:727:7: note: in expansion of macro '__list_check_srcu'
     727 |  for (__list_check_srcu(cond),     \
         |       ^~~~~~~~~~~~~~~~~
   arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
     232 |  hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rculist.h:727:30: warning: left-hand operand of comma expression has no effect [-Wunused-value]
     727 |  for (__list_check_srcu(cond),     \
         |                              ^
   arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
     232 |  hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/kvm/mmu/page_track.c: In function 'kvm_page_track_flush_slot':
>> include/linux/rculist.h:76:33: error: 'TRUE' undeclared (first use in this function)
      76 | #define __list_check_srcu(cond) TRUE
         |                                 ^~~~
   include/linux/rculist.h:727:7: note: in expansion of macro '__list_check_srcu'
     727 |  for (__list_check_srcu(cond),     \
         |       ^~~~~~~~~~~~~~~~~
   arch/x86/kvm/mmu/page_track.c:258:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
     258 |  hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rculist.h:727:30: warning: left-hand operand of comma expression has no effect [-Wunused-value]
     727 |  for (__list_check_srcu(cond),     \
         |                              ^
   arch/x86/kvm/mmu/page_track.c:258:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
     258 |  hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~

vim +/TRUE +76 include/linux/rculist.h

    58	
    59	#ifdef CONFIG_PROVE_RCU_LIST
    60	#define __list_check_rcu(dummy, cond, extra...)				\
    61		({								\
    62		check_arg_count_one(extra);					\
    63		RCU_LOCKDEP_WARN(!(cond) && !rcu_read_lock_any_held(),		\
    64				 "RCU-list traversed in non-reader section!");	\
    65		})
    66	
    67	#define __list_check_srcu(cond)					 \
    68		({								 \
    69		RCU_LOCKDEP_WARN(!(cond),					 \
    70			"RCU-list traversed without holding the required lock!");\
    71		})
    72	#else
    73	#define __list_check_rcu(dummy, cond, extra...)				\
    74		({ check_arg_count_one(extra); })
    75	
  > 76	#define __list_check_srcu(cond)	TRUE
    77	#endif
    78	

---
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: 49296 bytes --]

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

end of thread, other threads:[~2020-07-14  2:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-13 17:48 [PATCH] rculist: Fix _list_check_srcu() macro madhuparnabhowmik10
2020-07-13 21:02 ` Paul E. McKenney
2020-07-13 21:13   ` Madhuparna Bhowmik
2020-07-13 21:26     ` Paul E. McKenney
2020-07-13 23:40       ` Madhuparna Bhowmik
2020-07-14  2:37 ` 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).