From: Ben Hutchings <ben@decadent.org.uk>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/7] liblockdep: Fix undefined symbol prandom_u32
Date: Tue, 14 Jun 2016 21:47:13 +0100 [thread overview]
Message-ID: <20160614204713.GT7555@decadent.org.uk> (raw)
In-Reply-To: <20160614204437.GS7555@decadent.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1134 bytes --]
__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)
{
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
next prev parent reply other threads:[~2016-06-14 20:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 20:44 [PATCH 0/7] Fixes for liblockdep Ben Hutchings
2016-06-14 20:47 ` Ben Hutchings [this message]
2016-06-14 21:31 ` [PATCH 1/7] liblockdep: Fix undefined symbol prandom_u32 Sasha Levin
2016-06-14 20:47 ` [PATCH 2/7] liblockdep: Reduce MAX_LOCK_DEPTH to avoid overflowing lock_chain::depth Ben Hutchings
2016-06-14 21:13 ` Peter Zijlstra
2016-06-14 20:48 ` [PATCH 3/7] liblockdep: Define the ARRAY_SIZE() macro Ben Hutchings
2016-06-14 20:48 ` [PATCH 4/7] liblockdep: Enable -Wall by default Ben Hutchings
2016-06-14 20:48 ` [PATCH 5/7] liblockdep: Fix 'unused value' warnings Ben Hutchings
2016-06-14 20:49 ` [PATCH 6/7] liblockdep: Fix 'set but not used' warnings Ben Hutchings
2016-06-14 20:49 ` [PATCH 7/7] liblockdep: Fix 'defined but not used' warning for init_utsname() Ben Hutchings
2016-06-14 21:31 ` [PATCH 0/7] Fixes for liblockdep Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160614204713.GT7555@decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=sasha.levin@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox