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:   Fri, 19 May 2017 14:00:35 -0700
From:   Matthias Kaehlcke <mka@...omium.org>
To:     Christoph Lameter <cl@...ux.com>,
        Pekka Enberg <penberg@...nel.org>,
        David Rientjes <rientjes@...gle.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Matthias Kaehlcke <mka@...omium.org>
Subject: [PATCH 2/3] mm/slub: Mark slab_free_hook() as __maybe_unused

The function is only used when certain configuration option are enabled.
Adding the attribute fixes the following warning when building with
clang:

mm/slub.c:1258:20: error: unused function 'slab_free_hook'
    [-Werror,-Wunused-function]

Signed-off-by: Matthias Kaehlcke <mka@...omium.org>
---
 mm/slub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/slub.c b/mm/slub.c
index 66e1046435b7..23a8eb83efff 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1328,7 +1328,7 @@ static inline void kfree_hook(const void *x)
 	kasan_kfree_large(x);
 }
 
-static inline void *slab_free_hook(struct kmem_cache *s, void *x)
+static inline void *__maybe_unused slab_free_hook(struct kmem_cache *s, void *x)
 {
 	void *freeptr;
 
-- 
2.13.0.303.g4ebf302169-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ