diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index b8646e3af5e5..d8fde5d0cdf7 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h @@ -224,4 +224,7 @@ static inline void *virt_to_obj(struct kmem_cache *s, return (void *)x - ((x - slab_page) % s->size); } +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 28a8aa19d049..b0288a8a521b 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -622,7 +622,7 @@ static void slab_panic(const char *cause) static inline void slab_panic(const char *cause) {} #endif -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);