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]
Date:   Sun, 2 Jul 2017 02:28:02 -0700
From:   tip-bot for Kees Cook <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     keescook@...omium.org, linux-kernel@...r.kernel.org, hpa@...or.com,
        peterz@...radead.org, jpoimboe@...hat.com, tglx@...utronix.de,
        mingo@...nel.org, torvalds@...ux-foundation.org,
        elena.reshetova@...el.com
Subject: [tip:locking/core] locking/refcount: Remove the half-implemented
 refcount_sub() API

Commit-ID:  5d6dec6fba38c3e2d408df108bb92ef4ac201f18
Gitweb:     http://git.kernel.org/tip/5d6dec6fba38c3e2d408df108bb92ef4ac201f18
Author:     Kees Cook <keescook@...omium.org>
AuthorDate: Sat, 1 Jul 2017 11:01:29 -0700
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Sun, 2 Jul 2017 11:24:36 +0200

locking/refcount: Remove the half-implemented refcount_sub() API

CONFIG_REFCOUNT_FULL=y (correctly) does not provide a refcount_sub(),
which should not be part of proper refcount design patterns.

Remove the erroneous extern and the later !CONFIG_REFCOUNT_FULL
accidental implementation.

Signed-off-by: Kees Cook <keescook@...omium.org>
Cc: Elena Reshetova <elena.reshetova@...el.com>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Fixes: 29dee3c03abc ("locking/refcounts: Out-of-line everything")
Link: http://lkml.kernel.org/r/20170701180129.GA17405@beast
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 include/linux/refcount.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/include/linux/refcount.h b/include/linux/refcount.h
index bb71f28..591792c 100644
--- a/include/linux/refcount.h
+++ b/include/linux/refcount.h
@@ -49,7 +49,6 @@ extern __must_check bool refcount_inc_not_zero(refcount_t *r);
 extern void refcount_inc(refcount_t *r);
 
 extern __must_check bool refcount_sub_and_test(unsigned int i, refcount_t *r);
-extern void refcount_sub(unsigned int i, refcount_t *r);
 
 extern __must_check bool refcount_dec_and_test(refcount_t *r);
 extern void refcount_dec(refcount_t *r);
@@ -79,11 +78,6 @@ static inline __must_check bool refcount_sub_and_test(unsigned int i, refcount_t
 	return atomic_sub_and_test(i, &r->refs);
 }
 
-static inline void refcount_sub(unsigned int i, refcount_t *r)
-{
-	atomic_sub(i, &r->refs);
-}
-
 static inline __must_check bool refcount_dec_and_test(refcount_t *r)
 {
 	return atomic_dec_and_test(&r->refs);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ