]> Git Repo - linux.git/commitdiff
Merge branch 'dhowells' (patches from DavidH)
authorLinus Torvalds <[email protected]>
Tue, 14 Jan 2020 17:56:31 +0000 (09:56 -0800)
committerLinus Torvalds <[email protected]>
Tue, 14 Jan 2020 17:56:31 +0000 (09:56 -0800)
Merge misc fixes from David Howells.

Two afs fixes and a key refcounting fix.

* dhowells:
  afs: Fix afs_lookup() to not clobber the version on a new dentry
  afs: Fix use-after-loss-of-ref
  keys: Fix request_key() cache

1  2 
kernel/cred.c

diff --combined kernel/cred.c
index 9ed51b70ed8091fa90cf0ecfe887d8504a84c3bb,56395be1c2a81774b79700c1ccb3bcd948d75fb8..809a985b17934ae7e01a63621c5ca49ce03577ad
@@@ -175,8 -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 +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 +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 +715,7 @@@ struct cred *prepare_kernel_cred(struc
  #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);
This page took 0.075623 seconds and 4 git commands to generate.