public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Mark Salter <msalter@redhat.com>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	uclinux-h8-devel@lists.sourceforge.jp,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH] rcu: change _wait_rcu_gp() to work around gcc 67055 bug
Date: Tue, 25 Aug 2015 12:00:27 -0700	[thread overview]
Message-ID: <20150825190027.GI11078@linux.vnet.ibm.com> (raw)
In-Reply-To: <20150825184518.GA15234@redhat.com>

On Tue, Aug 25, 2015 at 08:45:18PM +0200, Oleg Nesterov wrote:
> The code like
> 
> 	const int n = const-expr;
> 	whatever_t array[n];
> 
> in inline function can confuse gcc, see
> 
> 	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67055#c13
> 
> This leads to
> 
> 	In file included from include/linux/rcupdate.h:429:0,
> 			  from include/linux/rcusync.h:5,
> 			  from kernel/rcu/sync.c:1:
> 	include/linux/rcutiny.h: In function 'rcu_barrier_sched':
> 	include/linux/rcutiny.h:55:20: internal compiler error: Segmentation
> 	fault
> 	  static inline void rcu_barrier_sched(void)
> 
> build failure after ec90a194a "rcu: Create a synchronize_rcu_mult()"
> and 114b7fd4b "rcu: Create rcu_sync infrastructure" meet each other.
> 
> Reported-and-tested-by: Mark Salter <msalter@redhat.com>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>

Ouch!!!  Queued for testing, in the absence of problems, will push into
the upcoming merge window.

Thank you all for the testing and the fix!

							Thanx, Paul

> ---
>  include/linux/rcupdate.h | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> index ff47651..c353c2b 100644
> --- a/include/linux/rcupdate.h
> +++ b/include/linux/rcupdate.h
> @@ -230,12 +230,11 @@ void __wait_rcu_gp(bool checktiny, int n, call_rcu_func_t *crcu_array,
>  		   struct rcu_synchronize *rs_array);
> 
>  #define _wait_rcu_gp(checktiny, ...) \
> -do { \
> -	call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; \
> -	const int __n = ARRAY_SIZE(__crcu_array); \
> -	struct rcu_synchronize __rs_array[__n]; \
> -	\
> -	__wait_rcu_gp(checktiny, __n, __crcu_array, __rs_array); \
> +do {									\
> +	call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; 		\
> +	struct rcu_synchronize __rs_array[ARRAY_SIZE(__crcu_array)];	\
> +	__wait_rcu_gp(checktiny, ARRAY_SIZE(__crcu_array),		\
> +			__crcu_array, __rs_array); 			\
>  } while (0)
> 
>  #define wait_rcu_gp(...) _wait_rcu_gp(false, __VA_ARGS__)
> -- 
> 2.4.3
> 
> 


  reply	other threads:[~2015-08-25 19:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-24 18:34 h8300 build failures ijn linux-next Guenter Roeck
2015-08-25  5:56 ` Yoshinori Sato
2015-08-25 14:27   ` Mark Salter
2015-08-25 15:03     ` h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300) Guenter Roeck
2015-08-25 16:11       ` Oleg Nesterov
2015-08-25 16:23         ` Oleg Nesterov
2015-08-25 16:51       ` Yoshinori Sato
2015-08-25 17:34         ` Oleg Nesterov
2015-08-25 18:02           ` Oleg Nesterov
2015-08-25 18:16             ` Mark Salter
2015-08-25 18:45       ` [PATCH] rcu: change _wait_rcu_gp() to work around gcc 67055 bug Oleg Nesterov
2015-08-25 19:00         ` Paul E. McKenney [this message]
2015-08-25 19:02         ` Oleg Nesterov

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=20150825190027.GI11078@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=msalter@redhat.com \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=uclinux-h8-devel@lists.sourceforge.jp \
    --cc=ysato@users.sourceforge.jp \
    /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