lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-3fe7522fb766f6ee76bf7bc2837f1e3cc52c4e27@git.kernel.org>
Date:   Sat, 9 Mar 2019 06:40:59 -0800
From:   tip-bot for Arnd Bergmann <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     torvalds@...ux-foundation.org, riel@...riel.com,
        tglx@...utronix.de, dave.hansen@...ux.intel.com,
        longman@...hat.com, arnd@...db.de, eranian@...gle.com,
        penguin-kernel@...ove.SAKURA.ne.jp, acme@...hat.com,
        peterz@...radead.org, hpa@...or.com, vincent.weaver@...ne.edu,
        akpm@...ux-foundation.org, luto@...nel.org, frederic@...nel.org,
        jolsa@...hat.com, bvanassche@....org, joel@...lfernandes.org,
        will.deacon@....com, alexander.shishkin@...ux.intel.com,
        paulmck@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
        rostedt@...dmis.org, bp@...en8.de, mingo@...nel.org
Subject: [tip:locking/urgent] locking/lockdep: Avoid a Clang warning

Commit-ID:  3fe7522fb766f6ee76bf7bc2837f1e3cc52c4e27
Gitweb:     https://git.kernel.org/tip/3fe7522fb766f6ee76bf7bc2837f1e3cc52c4e27
Author:     Arnd Bergmann <arnd@...db.de>
AuthorDate: Thu, 7 Mar 2019 08:52:12 +0100
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Sat, 9 Mar 2019 14:15:51 +0100

locking/lockdep: Avoid a Clang warning

Clang warns about a tentative array definition without a length:

  kernel/locking/lockdep.c:845:12: error: tentative array definition assumed to have one element [-Werror]

There is no real reason to do this here, so just set the same length as
in the real definition later in the same file.  It has to be hidden in
an #ifdef or annotated __maybe_unused though, to avoid the unused-variable
warning if CONFIG_PROVE_LOCKING is disabled.

Signed-off-by: Arnd Bergmann <arnd@...db.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Bart Van Assche <bvanassche@....org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: Frederic Weisbecker <frederic@...nel.org>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Joel Fernandes (Google) <joel@...lfernandes.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Rik van Riel <riel@...riel.com>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Steven Rostedt (VMware) <rostedt@...dmis.org>
Cc: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Vince Weaver <vincent.weaver@...ne.edu>
Cc: Waiman Long <longman@...hat.com>
Cc: Will Deacon <will.deacon@....com>
Link: https://lkml.kernel.org/r/20190307075222.3424524-1-arnd@arndb.de
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 kernel/locking/lockdep.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 21cb81fe6359..35a144dfddf5 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -842,7 +842,9 @@ static bool class_lock_list_valid(struct lock_class *c, struct list_head *h)
 	return true;
 }
 
-static u16 chain_hlocks[];
+#ifdef CONFIG_PROVE_LOCKING
+static u16 chain_hlocks[MAX_LOCKDEP_CHAIN_HLOCKS];
+#endif
 
 static bool check_lock_chain_key(struct lock_chain *chain)
 {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ