From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by kanga.kvack.org (Postfix) with ESMTP id 955256B0085 for ; Mon, 6 Oct 2014 12:01:29 -0400 (EDT) Received: by mail-pa0-f44.google.com with SMTP id et14so5509293pad.31 for ; Mon, 06 Oct 2014 09:01:29 -0700 (PDT) Received: from mailout3.w1.samsung.com (mailout3.w1.samsung.com. [210.118.77.13]) by mx.google.com with ESMTPS id bz3si13624150pab.107.2014.10.06.09.01.27 for (version=TLSv1 cipher=RC4-MD5 bits=128/128); Mon, 06 Oct 2014 09:01:28 -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 <0ND100ANZ5Z4VC80@mailout3.w1.samsung.com> for linux-mm@kvack.org; Mon, 06 Oct 2014 17:04:16 +0100 (BST) From: Andrey Ryabinin Subject: [PATCH v4 07/13] mm: slub: share slab_err and object_err functions Date: Mon, 06 Oct 2014 19:54:01 +0400 Message-id: <1412610847-27671-8-git-send-email-a.ryabinin@samsung.com> In-reply-to: <1412610847-27671-1-git-send-email-a.ryabinin@samsung.com> References: <1404905415-9046-1-git-send-email-a.ryabinin@samsung.com> <1412610847-27671-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.2 -- 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