Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools/lib/lockdep: Fix the build on recent kernels

The following upstream commit:

4a389810bc3c ("kernel/locking/lockdep.c: convert hash tables to hlists")

broke the tools/lib/lockdep build. Add trivial RCU wrappers to fix it.

These wrappers should probably be moved into their own header file.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Krinkin <krinkin.m.u@gmail.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>

+6
+6
tools/lib/lockdep/lockdep.c
··· 1 1 #include <linux/lockdep.h> 2 + 3 + /* Trivial API wrappers, we don't (yet) have RCU in user-space: */ 4 + #define hlist_for_each_entry_rcu hlist_for_each_entry 5 + #define hlist_add_head_rcu hlist_add_head 6 + #define hlist_del_rcu hlist_del 7 + 2 8 #include "../../../kernel/locking/lockdep.c"