Re: [PATCH 23/27] locking/lockdep: Check data structure consistency

2018-11-29 Thread Peter Zijlstra
On Thu, Nov 29, 2018 at 08:50:02AM -0800, Bart Van Assche wrote: > On Thu, 2018-11-29 at 13:30 +0100, Peter Zijlstra wrote: > > IIRC there were a few other sites in the series, please check them all. > > OK, I will add braces around multi-line statement blocks. You may want to > know that checkpat

Re: [PATCH 23/27] locking/lockdep: Check data structure consistency

2018-11-29 Thread Bart Van Assche
On Thu, 2018-11-29 at 13:30 +0100, Peter Zijlstra wrote: > IIRC there were a few other sites in the series, please check them all. OK, I will add braces around multi-line statement blocks. You may want to know that checkpatch didn't complain about missing braces. Bart.

Re: [PATCH 23/27] locking/lockdep: Check data structure consistency

2018-11-29 Thread Peter Zijlstra
On Wed, Nov 28, 2018 at 03:43:21PM -0800, Bart Van Assche wrote: > +static bool in_list(struct list_head *e, struct list_head *h) > +{ > + struct list_head *f; > + > + list_for_each(f, h) > + if (e == f) > + return true; Coding style wants { } around any mu

[PATCH 23/27] locking/lockdep: Check data structure consistency

2018-11-28 Thread Bart Van Assche
Debugging lockdep data structure inconsistencies is challenging. Add disabled code that verifies data structure consistency at runtime. Signed-off-by: Bart Van Assche --- kernel/locking/lockdep.c | 142 +++ 1 file changed, 142 insertions(+) diff --git a/kerne