From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753428AbcB2Jaw (ORCPT ); Mon, 29 Feb 2016 04:30:52 -0500 Received: from mx2.parallels.com ([199.115.105.18]:44354 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753297AbcB2Jav (ORCPT ); Mon, 29 Feb 2016 04:30:51 -0500 Subject: Re: + kernel-locking-lockdepc-make-lockdep-initialize-itself-on-demand.patch added to -mm tree To: Ingo Molnar , Andrew Morton , Sasha Levin References: <56b11d2d.vVw1kB2la7Y+70xF%akpm@linux-foundation.org> <20160203074430.GA32652@gmail.com> <20160203085111.fc3f2631.akpm@linux-foundation.org> <20160209111228.GA32615@gmail.com> <20160209121732.7713af6a1e244e1af00324de@linux-foundation.org> <20160229091102.GA8361@gmail.com> <20160229092522.GA12507@gmail.com> CC: , , , , Peter Zijlstra , Thomas Gleixner From: Andrey Ryabinin Message-ID: <56D40FA5.8050609@virtuozzo.com> Date: Mon, 29 Feb 2016 12:30:13 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160229092522.GA12507@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: US-EXCH2.sw.swsoft.com (10.255.249.46) To US-EXCH2.sw.swsoft.com (10.255.249.46) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/29/2016 12:25 PM, Ingo Molnar wrote: > > * Ingo Molnar wrote: > >> >> * Andrew Morton wrote: >> >>> On Tue, 9 Feb 2016 12:12:29 +0100 Ingo Molnar wrote: >>> >>>>> The conceptual problem is that if some piece of code does spin_lock_init() or >>>>> DEFINE_SPINLOCK(), that lock isn't necessarily initialized yet. >>>> >>>> The conceptual problem is that the data structures are not build time initialized >>>> - but the hlist conversion patch solves that problem nicely! >>>> >>>> So I'm a happy camper. >>> >>> OK, so the below has been in -next for nearly a week, no issues. We >>> should get this into 4.5 to fix the CONFIG_UBSAN_ALIGNMENT issue. >> >> So I think this patch broke liblockdep: >> >> triton:~/tip/tools/lib/lockdep> >> >> In file included from lockdep.c:2:0: >> ../../../kernel/locking/lockdep.c: In function ‘look_up_lock_class’: >> ../../../kernel/locking/lockdep.c:722:2: warning: implicit declaration of function ‘hlist_for_each_entry_rcu’ [-Wimplicit-function-declaration] >> hlist_for_each_entry_rcu(class, hash_head, hash_entry) { > > The patch below fixes it. > > Thanks, > > Ingo > > tools/lib/lockdep/lockdep.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/tools/lib/lockdep/lockdep.c b/tools/lib/lockdep/lockdep.c > index f42b7e9aa48f..a0a2e3a266af 100644 > --- a/tools/lib/lockdep/lockdep.c > +++ b/tools/lib/lockdep/lockdep.c > @@ -1,2 +1,8 @@ > #include > + > +/* Trivial API wrappers, we don't (yet) have RCU in user-space: */ > +#define hlist_for_each_entry_rcu hlist_for_each_entry > +#define hlist_add_head_rcu hlist_add_head > +#define hlist_del_rcu hlist_del > + I think this belongs to tools/lib/lockdep/uinclude/linux/kernel.h