From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753025AbcFNUrQ (ORCPT ); Tue, 14 Jun 2016 16:47:16 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:52704 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751932AbcFNUrP (ORCPT ); Tue, 14 Jun 2016 16:47:15 -0400 Date: Tue, 14 Jun 2016 21:47:13 +0100 From: Ben Hutchings To: Sasha Levin Cc: linux-kernel@vger.kernel.org Message-ID: <20160614204713.GT7555@decadent.org.uk> References: <20160614204437.GS7555@decadent.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XUd+PsnCfaVdInSg" Content-Disposition: inline In-Reply-To: <20160614204437.GS7555@decadent.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ben@decadent.org.uk Subject: [PATCH 1/7] liblockdep: Fix undefined symbol prandom_u32 X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on shadbolt.decadent.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --XUd+PsnCfaVdInSg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable __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 --- 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 #include +#include #include #include #include @@ -10,6 +11,11 @@ static __thread struct task_struct current_obj; /* lockdep wants these */ bool debug_locks =3D true; bool debug_locks_silent; +u32 prandom_u32(void) +{ + /* Used only by lock_pin_lock() which is dead code */ + abort(); +} =20 __attribute__((destructor)) static void liblockdep_exit(void) { --XUd+PsnCfaVdInSg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIVAwUBV2BtUee/yOyVhhEJAQoJkw//bZhNcOxCKn4EQ7A8ver2iMbZ/kQpjENJ 8ZKDc+dTQUPOJr0Q3FX3GCyGOXcx8ZFepHwrUx8892phcpEq7IpGgJN3BzIAee3T Kq1shXgtdrQBIoEYiS7akXnQ+vO/LB66rMIbg6mhYa37IEnZiXbbMDhKFBDaiC+b HjXaMictPisjIG1TEYirDQUJfuE9S+zliT8LHPurRXpGYRJ/lJiXha54gHLwbGOG NFzSvvroQoH9exctDu5Y15XhoJtD9kVScsOyFXR234KgltWCg/MMdtP3mCgBPdMZ 7/cr2Plf1H3X3uoydvL89ecpOD1y1Z/i0CRKcIaCbM7TBZK2sfUjUV1HvaI7jMZz qlRLmGIlpXWaou7W5f+RxYqRRyS8JBUpd71fpWUhgNoY2TKil2u4QLHuPPDHRupq znc41pGxxpa84HxflKjOcJXyNyNL7OaopPxR4odhUerE210baegpwADP618Ysl7a Zf1C2yWvdOYU7U5A/OFnqm7aqiIIPKGHnCR7+76+7TVviboh2oEj4XEYJN9n5LJB 42suuLUhRHwx4UQB4NzjjJKRTI/SR5s5IDNhSFulHJn+xxP2e5UOAsl7XAcq6Iuo O9zI7wZK6IHWDlOZwSL2/MBG7/eSMjTjXJJkSIfb5rFZRAPm0cL0jqgfG9T9k790 9yk9iyvDhk0= =4Pq5 -----END PGP SIGNATURE----- --XUd+PsnCfaVdInSg--