aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/user_namespace.h2
-rw-r--r--mm/slab.c4
-rw-r--r--mm/slub.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index bb320573bb9e..1101b0ce878f 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
@@ -49,7 +49,7 @@ static inline struct user_namespace *copy_user_ns(int flags,
49 if (flags & CLONE_NEWUSER) 49 if (flags & CLONE_NEWUSER)
50 return ERR_PTR(-EINVAL); 50 return ERR_PTR(-EINVAL);
51 51
52 return NULL; 52 return old_ns;
53} 53}
54 54
55static inline void put_user_ns(struct user_namespace *ns) 55static inline void put_user_ns(struct user_namespace *ns)
diff --git a/mm/slab.c b/mm/slab.c
index 88bc6336ce3d..c3feeaab3875 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3690,8 +3690,8 @@ static __always_inline void *__do_kmalloc(size_t size, gfp_t flags,
3690 * functions. 3690 * functions.
3691 */ 3691 */
3692 cachep = __find_general_cachep(size, flags); 3692 cachep = __find_general_cachep(size, flags);
3693 if (unlikely(cachep == NULL)) 3693 if (unlikely(ZERO_OR_NULL_PTR(cachep)))
3694 return NULL; 3694 return cachep;
3695 return __cache_alloc(cachep, flags, caller); 3695 return __cache_alloc(cachep, flags, caller);
3696} 3696}
3697 3697
diff --git a/mm/slub.c b/mm/slub.c
index 52a4f44be394..322f3a5d72c7 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2394,7 +2394,7 @@ size_t ksize(const void *object)
2394 struct page *page; 2394 struct page *page;
2395 struct kmem_cache *s; 2395 struct kmem_cache *s;
2396 2396
2397 if (object == ZERO_SIZE_PTR) 2397 if (ZERO_OR_NULL_PTR(object))
2398 return 0; 2398 return 0;
2399 2399
2400 page = get_object_page(object); 2400 page = get_object_page(object);