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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3B18HnHLxpx=ktkeEnuZiTuMqpNEanExqLaQFZ0SeD_w@mail.gmail.com>
Date:   Wed, 19 Apr 2017 20:45:14 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:     Josh Triplett <josh@...htriplett.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Lai Jiangshan <jiangshanlai@...il.com>,
        Wei Yongjun <yongjun_wei@...ndmicro.com.cn>,
        Ingo Molnar <mingo@...nel.org>,
        Boqun Feng <boqun.feng@...il.com>,
        SeongJae Park <sj38.park@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rcuperf: fix duplicate struct initializer

On Wed, Apr 19, 2017 at 8:15 PM, Paul E. McKenney
<paulmck@...ux.vnet.ibm.com> wrote:
> On Wed, Apr 19, 2017 at 07:14:34PM +0200, Arnd Bergmann wrote:
>> Building with "make W=1" shows a set of new warnings in the rcuperf code:
>>
>> kernel/rcu/rcuperf.c:282:11: error: initialized field overwritten [-Werror=override-init]
>>   .async  = srcu_call_rcu,
>> kernel/rcu/rcuperf.c:282:11: note: (near initialization for 'sched_ops.async')
>> kernel/rcu/rcuperf.c:283:16: error: initialized field overwritten [-Werror=override-init]
>>   .gp_barrier = srcu_rcu_barrier,
>> kernel/rcu/rcuperf.c:283:16: note: (near initialization for 'sched_ops.gp_barrier')
>> kernel/rcu/rcuperf.c:313:11: error: initialized field overwritten [-Werror=override-init]
>>   .async  = call_rcu_tasks,
>> kernel/rcu/rcuperf.c:313:11: note: (near initialization for 'tasks_ops.async')
>> kernel/rcu/rcuperf.c:314:16: error: initialized field overwritten [-Werror=override-init]
>>   .gp_barrier = rcu_barrier_tasks,
>> kernel/rcu/rcuperf.c:314:16: note: (near initialization for 'tasks_ops.gp_barrier')
>>
>> This appears to be a copy-paste bug, so we can remove the extranous copy.
>>
>> Fixes: f743d20f2cc6 ("rcuperf: Add ability to performance-test call_rcu() and friends")
>> Signed-off-by: Arnd Bergmann <arnd@...db.de>
>
> For those times when you want to be -really- sure that the field is in
> fact initialized!  ;-)
>
> Good catch!!!  I merged this into the original commit with attribution:
>
> [ paulmck: Removed the redundant initialization noted by Arnd Bergmann. ]

Thanks!

Note that one of them was not redundant but actually incorrect, as it
replaced the _rcu_sched variant with the srcu_ variant.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ