]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - include/linux/cred.h
CRED: Use RCU to access another task's creds and to release a task's own creds
[mirror_ubuntu-zesty-kernel.git] / include / linux / cred.h
index 4221ec6000c1bd4183f2e6706ca4dd5224afeca1..166ce4ddba64d3843376e0e5b75456a820ede760 100644 (file)
@@ -147,8 +147,9 @@ static inline struct cred *get_cred(struct cred *cred)
  * Release a reference to a set of credentials, deleting them when the last ref
  * is released.
  */
-static inline void put_cred(struct cred *cred)
+static inline void put_cred(const struct cred *_cred)
 {
+       struct cred *cred = (struct cred *) _cred;
        if (atomic_dec_and_test(&(cred)->usage))
                __put_cred(cred);
 }