diff options
-rw-r--r-- | include/linux/user_namespace.h | 2 | ||||
-rw-r--r-- | mm/slab.c | 4 | ||||
-rw-r--r-- | mm/slub.c | 2 |
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 | ||
55 | static inline void put_user_ns(struct user_namespace *ns) | 55 | static inline void put_user_ns(struct user_namespace *ns) |
@@ -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 | ||
@@ -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); |