Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 19 Jul 2007 21:11:14 +0000 (14:11 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 19 Jul 2007 21:11:14 +0000 (14:11 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  [PATCH] sched: implement cpu_clock(cpu) high-speed time source
  [PATCH] sched: fix the all pinned logic in load_balance_newidle()
  [PATCH] sched: fix newly idle load balance in case of SMT
  [PATCH] sched: sched_cacheflush is now unused

include/linux/user_namespace.h
mm/slab.c
mm/slub.c

index bb320573bb9ee6ab216f28a138c9f1ce83ed5caf..1101b0ce878f67973d5037f7b651cabf1fb8d28e 100644 (file)
@@ -49,7 +49,7 @@ static inline struct user_namespace *copy_user_ns(int flags,
        if (flags & CLONE_NEWUSER)
                return ERR_PTR(-EINVAL);
 
-       return NULL;
+       return old_ns;
 }
 
 static inline void put_user_ns(struct user_namespace *ns)
index 88bc6336ce3d3662c897b61a8ca25e33744e31a5..c3feeaab387537ef00aa2085b4f54f6d7e4abca0 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3690,8 +3690,8 @@ static __always_inline void *__do_kmalloc(size_t size, gfp_t flags,
         * functions.
         */
        cachep = __find_general_cachep(size, flags);
-       if (unlikely(cachep == NULL))
-               return NULL;
+       if (unlikely(ZERO_OR_NULL_PTR(cachep)))
+               return cachep;
        return __cache_alloc(cachep, flags, caller);
 }
 
index 52a4f44be39463500f3e1a51283d8a6670762c37..322f3a5d72c702523a0a2834baea1d68dd67bb4d 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2394,7 +2394,7 @@ size_t ksize(const void *object)
        struct page *page;
        struct kmem_cache *s;
 
-       if (object == ZERO_SIZE_PTR)
+       if (ZERO_OR_NULL_PTR(object))
                return 0;
 
        page = get_object_page(object);