lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200624182839.GI9247@paulmck-ThinkPad-P72>
Date:   Wed, 24 Jun 2020 11:28:39 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     kernel test robot <lkp@...el.com>
Cc:     kbuild-all@...ts.01.org, Josh Triplett <josh@...htriplett.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Lai Jiangshan <jiangshanlai@...il.com>,
        Joel Fernandes <joel@...lfernandes.org>, rcu@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH linux-next] refperf: __srcu_struct_srcu_refctl_scale
 can be static

On Thu, Jun 25, 2020 at 01:47:09AM +0800, kernel test robot wrote:
> 
> Signed-off-by: kernel test robot <lkp@...el.com>

This gets me the following from gcc version 7.5.0:

kernel/rcu/refscale.c:162:1: error: duplicate ‘static’
 static DEFINE_STATIC_SRCU(srcu_refctl_scale);
 ^~~~~~

Is the concern the __srcu_struct_srcu_refctl_scale that is defined
as non-static?  Last I checked, non-static was required in order for
the ___srcu_struct_ptrs mechanism to correctly allocate the needed
per-CPU data.

						Thanx, Paul

> ---
>  refscale.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c
> index d9291f883b5428..4097b53867b33d 100644
> --- a/kernel/rcu/refscale.c
> +++ b/kernel/rcu/refscale.c
> @@ -159,7 +159,7 @@ static struct ref_scale_ops rcu_ops = {
>  };
>  
>  // Definitions for SRCU ref scale testing.
> -DEFINE_STATIC_SRCU(srcu_refctl_scale);
> +static DEFINE_STATIC_SRCU(srcu_refctl_scale);
>  static struct srcu_struct *srcu_ctlp = &srcu_refctl_scale;
>  
>  static void srcu_ref_scale_read_section(const int nloops)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ