diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 56fe96319..476e1d1eb 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -621,6 +621,8 @@ char *widen_string(char *buf, int n, char *end, struct printf_spec spec) return buf; } +/* Safe default value */ +const char *s = ""; /* Handle string from a well known address. */ static char *string_nocheck(char *buf, char *end, const char *s, struct printf_spec spec) diff --git a/mm/slub.c b/mm/slub.c index 1f50129dc..644bdb921 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4071,6 +4071,9 @@ struct kmem_cache *slab_pre_alloc_hook(struct kmem_cache *s, gfp_t flags) return s; } +/* Safe default value */ +const char *s = ""; + static __fastpath_inline bool slab_post_alloc_hook(struct kmem_cache *s, struct list_lru *lru, gfp_t flags, size_t size, void **p, bool init,