Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1422326

[PATCH 1/7] liblockdep: Fix undefined symbol prandom_u32

From Ben Hutchings <ben@decadent.org.uk>
Newsgroups linux.kernel
Subject [PATCH 1/7] liblockdep: Fix undefined symbol prandom_u32
Date 2016-06-14 22:50 +0200
Message-ID <rK3rA-1nX-41@gated-at.bofh.it> (permalink)
References <rK3rz-1nX-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

__lock_pin_lock() now calls prandom_u32() which is not defined in
liblockdep.  __lock_pin_lock() and its caller lock_pin_lock() are dead
code in liblockdep, but we still need to provide a definition of
prandom_u32() in case lazy binding is disabled.

Fixes: e7904a28f533 ("locking/lockdep, sched/core: Implement a better ...")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 tools/lib/lockdep/common.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/lib/lockdep/common.c b/tools/lib/lockdep/common.c
index d1c89cc06f5f..405c17667c4d 100644
--- a/tools/lib/lockdep/common.c
+++ b/tools/lib/lockdep/common.c
@@ -1,5 +1,6 @@
 #include <stddef.h>
 #include <stdbool.h>
+#include <stdlib.h>
 #include <linux/compiler.h>
 #include <linux/lockdep.h>
 #include <unistd.h>
@@ -10,6 +11,11 @@ static __thread struct task_struct current_obj;
 /* lockdep wants these */
 bool debug_locks = true;
 bool debug_locks_silent;
+u32 prandom_u32(void)
+{
+	/* Used only by lock_pin_lock() which is dead code */
+	abort();
+}
 
 __attribute__((destructor)) static void liblockdep_exit(void)
 {

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/7] Fixes for liblockdep Ben Hutchings <ben@decadent.org.uk> - 2016-06-14 22:50 +0200
  [PATCH 3/7] liblockdep: Define the ARRAY_SIZE() macro Ben Hutchings <ben@decadent.org.uk> - 2016-06-14 22:50 +0200
  [PATCH 5/7] liblockdep: Fix 'unused value' warnings Ben Hutchings <ben@decadent.org.uk> - 2016-06-14 22:50 +0200
  [PATCH 4/7] liblockdep: Enable -Wall by default Ben Hutchings <ben@decadent.org.uk> - 2016-06-14 22:50 +0200
  [PATCH 1/7] liblockdep: Fix undefined symbol prandom_u32 Ben Hutchings <ben@decadent.org.uk> - 2016-06-14 22:50 +0200
    Re: [PATCH 1/7] liblockdep: Fix undefined symbol prandom_u32 Sasha Levin <sasha.levin@oracle.com> - 2016-06-14 23:40 +0200
  [PATCH 2/7] liblockdep: Reduce MAX_LOCK_DEPTH to avoid overflowing  lock_chain::depth Ben Hutchings <ben@decadent.org.uk> - 2016-06-14 22:50 +0200
    Re: [PATCH 2/7] liblockdep: Reduce MAX_LOCK_DEPTH to avoid  overflowing lock_chain::depth Peter Zijlstra <peterz@infradead.org> - 2016-06-14 23:20 +0200
  Re: [PATCH 0/7] Fixes for liblockdep Sasha Levin <sasha.levin@oracle.com> - 2016-06-14 23:40 +0200

csiph-web