X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;ds=sidebyside;f=include%2Flinux%2Fcred.h;h=65d870c9d00e38512c778980ee662d3d07de5059;hb=75094825046a23067ba6f3a1d93007a764dc5aec;hp=631286535d0f126a13a366b924cae62f58d114e1;hpb=409232a45096a2c0d06634269a7c1c3412ecf910;p=mirror_ubuntu-bionic-kernel.git diff --git a/include/linux/cred.h b/include/linux/cred.h index 631286535d0f..65d870c9d00e 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h @@ -145,7 +145,11 @@ struct cred { struct user_struct *user; /* real user ID subscription */ struct user_namespace *user_ns; /* user_ns the caps and keyrings are relative to. */ struct group_info *group_info; /* supplementary groups for euid/fsgid */ - struct rcu_head rcu; /* RCU deletion hook */ + /* RCU deletion */ + union { + int non_rcu; /* Can we skip RCU deletion? */ + struct rcu_head rcu; /* RCU deletion hook */ + }; } __randomize_layout; extern void __put_cred(struct cred *); @@ -159,6 +163,7 @@ extern int commit_creds(struct cred *); extern void abort_creds(struct cred *); extern const struct cred *override_creds(const struct cred *); extern void revert_creds(const struct cred *); +extern struct cred *clone_cred(const struct cred *old); extern struct cred *prepare_kernel_cred(struct task_struct *); extern int change_create_files_as(struct cred *, struct inode *); extern int set_security_override(struct cred *, u32); @@ -243,6 +248,7 @@ static inline const struct cred *get_cred(const struct cred *cred) { struct cred *nonconst_cred = (struct cred *) cred; validate_creds(cred); + nonconst_cred->non_rcu = 0; return get_new_cred(nonconst_cred); }