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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 5 Jun 2017 02:02:19 -0700
From:   tip-bot for Ben Hutchings <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     hpa@...or.com, torvalds@...ux-foundation.org,
        linux-kernel@...r.kernel.org, mingo@...nel.org,
        sasha.levin@...cle.com, ben@...adent.org.uk, peterz@...radead.org,
        tglx@...utronix.de
Subject: [tip:locking/core] tools/lib/lockdep: Define the ARRAY_SIZE() macro

Commit-ID:  108744c45fd8a51e763e976d9e5b2cc265d4a847
Gitweb:     http://git.kernel.org/tip/108744c45fd8a51e763e976d9e5b2cc265d4a847
Author:     Ben Hutchings <ben@...adent.org.uk>
AuthorDate: Thu, 25 May 2017 12:58:34 +0000
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 5 Jun 2017 09:28:04 +0200

tools/lib/lockdep: Define the ARRAY_SIZE() macro

lockdep.c now uses ARRAY_SIZE().

Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@...cle.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: a.p.zijlstra@...llo.nl
Fixes: 75dd602a5198 ("lockdep: Fix lock_chain::base size")
Link: http://lkml.kernel.org/r/20170525130005.5947-4-alexander.levin@verizon.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 tools/lib/lockdep/uinclude/linux/kernel.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/lib/lockdep/uinclude/linux/kernel.h b/tools/lib/lockdep/uinclude/linux/kernel.h
index 276c7a8..da87bd9 100644
--- a/tools/lib/lockdep/uinclude/linux/kernel.h
+++ b/tools/lib/lockdep/uinclude/linux/kernel.h
@@ -7,6 +7,8 @@
 #include <linux/hardirq.h>
 #include <linux/kern_levels.h>
 
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+
 #ifndef container_of
 #define container_of(ptr, type, member) ({			\
 	const typeof(((type *)0)->member) * __mptr = (ptr);	\

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ