]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blobdiff - kernel/cred.c
staging: comedi: das800: Fix endian problem for AI command data
[mirror_ubuntu-focal-kernel.git] / kernel / cred.c
index c0a4c12d38b20ed80254c76acb28c6d060b1df86..809a985b17934ae7e01a63621c5ca49ce03577ad 100644 (file)
@@ -175,8 +175,8 @@ void exit_creds(struct task_struct *tsk)
        put_cred(cred);
 
 #ifdef CONFIG_KEYS_REQUEST_CACHE
-       key_put(current->cached_requested_key);
-       current->cached_requested_key = NULL;
+       key_put(tsk->cached_requested_key);
+       tsk->cached_requested_key = NULL;
 #endif
 }
 
@@ -223,7 +223,7 @@ struct cred *cred_alloc_blank(void)
        new->magic = CRED_MAGIC;
 #endif
 
-       if (security_cred_alloc_blank(new, GFP_KERNEL) < 0)
+       if (security_cred_alloc_blank(new, GFP_KERNEL_ACCOUNT) < 0)
                goto error;
 
        return new;
@@ -282,7 +282,7 @@ struct cred *prepare_creds(void)
        new->security = NULL;
 #endif
 
-       if (security_prepare_creds(new, old, GFP_KERNEL) < 0)
+       if (security_prepare_creds(new, old, GFP_KERNEL_ACCOUNT) < 0)
                goto error;
        validate_creds(new);
        return new;
@@ -715,7 +715,7 @@ struct cred *prepare_kernel_cred(struct task_struct *daemon)
 #ifdef CONFIG_SECURITY
        new->security = NULL;
 #endif
-       if (security_prepare_creds(new, old, GFP_KERNEL) < 0)
+       if (security_prepare_creds(new, old, GFP_KERNEL_ACCOUNT) < 0)
                goto error;
 
        put_cred(old);