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]
Message-ID: <tip-61d4595eed163ea416c13c4b994f22190711151b@git.kernel.org>
Date:   Mon, 5 Jun 2017 02:11:22 -0700
From:   "tip-bot for Levin, Alexander (Sasha Levin)" <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     alexander.levin@...izon.com, tglx@...utronix.de,
        torvalds@...ux-foundation.org, hpa@...or.com,
        linux-kernel@...r.kernel.org, peterz@...radead.org,
        mingo@...nel.org
Subject: [tip:locking/core] tools/include: Add IS_ERR_OR_NULL to err.h

Commit-ID:  61d4595eed163ea416c13c4b994f22190711151b
Gitweb:     http://git.kernel.org/tip/61d4595eed163ea416c13c4b994f22190711151b
Author:     Levin, Alexander (Sasha Levin) <alexander.levin@...izon.com>
AuthorDate: Thu, 25 May 2017 12:58:56 +0000
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 5 Jun 2017 09:28:12 +0200

tools/include: Add IS_ERR_OR_NULL to err.h

Signed-off-by: Sasha Levin <alexander.levin@...izon.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
Cc: ben@...adent.org.uk
Link: http://lkml.kernel.org/r/20170525130005.5947-20-alexander.levin@verizon.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 tools/include/linux/err.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/include/linux/err.h b/tools/include/linux/err.h
index bdc3dd8..abf0478 100644
--- a/tools/include/linux/err.h
+++ b/tools/include/linux/err.h
@@ -46,4 +46,9 @@ static inline bool __must_check IS_ERR(__force const void *ptr)
 	return IS_ERR_VALUE((unsigned long)ptr);
 }
 
+static inline bool __must_check IS_ERR_OR_NULL(__force const void *ptr)
+{
+	return unlikely(!ptr) || IS_ERR_VALUE((unsigned long)ptr);
+}
+
 #endif /* _LINUX_ERR_H */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ