From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) by kanga.kvack.org (Postfix) with ESMTP id 37C8C6B003D for ; Wed, 24 Sep 2014 08:51:32 -0400 (EDT) Received: by mail-pd0-f170.google.com with SMTP id y13so8448078pdi.15 for ; Wed, 24 Sep 2014 05:51:31 -0700 (PDT) Received: from mailout3.w1.samsung.com (mailout3.w1.samsung.com. [210.118.77.13]) by mx.google.com with ESMTPS id gz11si26185872pbd.58.2014.09.24.05.51.30 for (version=TLSv1 cipher=RC4-MD5 bits=128/128); Wed, 24 Sep 2014 05:51:31 -0700 (PDT) Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NCE00KQGP6HLF90@mailout3.w1.samsung.com> for linux-mm@kvack.org; Wed, 24 Sep 2014 13:54:17 +0100 (BST) From: Andrey Ryabinin Subject: [PATCH v3 07/13] mm: slub: share slab_err and object_err functions Date: Wed, 24 Sep 2014 16:44:03 +0400 Message-id: <1411562649-28231-8-git-send-email-a.ryabinin@samsung.com> In-reply-to: <1411562649-28231-1-git-send-email-a.ryabinin@samsung.com> References: <1404905415-9046-1-git-send-email-a.ryabinin@samsung.com> <1411562649-28231-1-git-send-email-a.ryabinin@samsung.com> Sender: owner-linux-mm@kvack.org List-ID: To: linux-kernel@vger.kernel.org Cc: Andrey Ryabinin , Dmitry Vyukov , Konstantin Serebryany , Dmitry Chernenkov , Andrey Konovalov , Yuri Gribov , Konstantin Khlebnikov , Sasha Levin , Christoph Lameter , Joonsoo Kim , Andrew Morton , Dave Hansen , Andi Kleen , Vegard Nossum , "H. Peter Anvin" , Dave Jones , x86@kernel.org, linux-mm@kvack.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 | 4 ++++ mm/slub.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index c75bc1d..8fed60d 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h @@ -115,4 +115,8 @@ static inline void *virt_to_obj(struct kmem_cache *s, void *slab_page, void *x) return x - ((x - slab_page) % s->size); } +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 ae7b9f1..82282f5 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.1 -- 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