From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by kanga.kvack.org (Postfix) with ESMTP id 1EF666B00D0 for ; Mon, 24 Nov 2014 13:02:51 -0500 (EST) Received: by mail-pd0-f175.google.com with SMTP id y10so10219329pdj.6 for ; Mon, 24 Nov 2014 10:02:50 -0800 (PST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com. [210.118.77.11]) by mx.google.com with ESMTPS id i6si22783257pdp.62.2014.11.24.10.02.46 for (version=TLSv1 cipher=RC4-MD5 bits=128/128); Mon, 24 Nov 2014 10:02:48 -0800 (PST) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NFK00LN629B6100@mailout1.w1.samsung.com> for linux-mm@kvack.org; Mon, 24 Nov 2014 18:05:35 +0000 (GMT) From: Andrey Ryabinin Subject: [PATCH v7 06/12] mm: slub: share slab_err and object_err functions Date: Mon, 24 Nov 2014 21:02:19 +0300 Message-id: <1416852146-9781-7-git-send-email-a.ryabinin@samsung.com> In-reply-to: <1416852146-9781-1-git-send-email-a.ryabinin@samsung.com> References: <1404905415-9046-1-git-send-email-a.ryabinin@samsung.com> <1416852146-9781-1-git-send-email-a.ryabinin@samsung.com> Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Andrey Ryabinin , Joe Perches , Dmitry Vyukov , Konstantin Serebryany , Dmitry Chernenkov , Andrey Konovalov , Yuri Gribov , Konstantin Khlebnikov , Sasha Levin , Christoph Lameter , Joonsoo Kim , Dave Hansen , Andi Kleen , Vegard Nossum , "H. Peter Anvin" , Dave Jones , x86@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pekka Enberg , David Rientjes Remove static and add function declarations to mm/slab.h so they could be used by kernel address sanitizer. Signed-off-by: Andrey Ryabinin --- include/linux/slub_def.h | 5 +++++ mm/slub.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index c75bc1d..144b5cb 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h @@ -115,4 +115,9 @@ static inline void *virt_to_obj(struct kmem_cache *s, void *slab_page, void *x) return x - ((x - slab_page) % s->size); } +__printf(3, 4) +void slab_err(struct kmem_cache *s, struct page *page, const char *fmt, ...); +void object_err(struct kmem_cache *s, struct page *page, + u8 *object, char *reason); + #endif /* _LINUX_SLUB_DEF_H */ diff --git a/mm/slub.c b/mm/slub.c index 95d2142..0c01584 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -629,14 +629,14 @@ static void print_trailer(struct kmem_cache *s, struct page *page, u8 *p) dump_stack(); } -static void object_err(struct kmem_cache *s, struct page *page, +void object_err(struct kmem_cache *s, struct page *page, u8 *object, char *reason) { slab_bug(s, "%s", reason); print_trailer(s, page, object); } -static void slab_err(struct kmem_cache *s, struct page *page, +void slab_err(struct kmem_cache *s, struct page *page, const char *fmt, ...) { va_list args; -- 2.1.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org