tools headers UAPI: Sync linux/kvm.h with the kernel sources
[linux-2.6-microblaze.git] / kernel / cred.c
index dcfa30b..e6fd2b3 100644 (file)
@@ -33,7 +33,7 @@ do {                                                                  \
 static struct kmem_cache *cred_jar;
 
 /* init to 2 - one for init_task, one to ensure it is never freed */
-struct group_info init_groups = { .usage = ATOMIC_INIT(2) };
+static struct group_info init_groups = { .usage = ATOMIC_INIT(2) };
 
 /*
  * The initial credentials for the initial task
@@ -372,7 +372,8 @@ int copy_creds(struct task_struct *p, unsigned long clone_flags)
                ret = create_user_ns(new);
                if (ret < 0)
                        goto error_put;
-               if (set_cred_ucounts(new) < 0)
+               ret = set_cred_ucounts(new);
+               if (ret < 0)
                        goto error_put;
        }