diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-10-08 10:52:18 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-10-08 10:52:18 +0200 |
commit | d3df65c198dc2f1deefb73c8427b04d1bdd1b18d (patch) | |
tree | f348c249146e2a1bbe2040ebecb0c529f5449b84 /ipc/util.c | |
parent | 712df65ccb63da08a484bf57c40b250dfd4103a7 (diff) | |
parent | 00e6fa5fe15c0eccc95a9d1afc4615e467ee8dc9 (diff) |
Merge branch 'perf/urgent' into perf/core, before pulling new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'ipc/util.c')
-rw-r--r-- | ipc/util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ipc/util.c b/ipc/util.c index be4230020a1f..0f401d94b7c6 100644 --- a/ipc/util.c +++ b/ipc/util.c @@ -237,6 +237,10 @@ int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size) rcu_read_lock(); spin_lock(&new->lock); + current_euid_egid(&euid, &egid); + new->cuid = new->uid = euid; + new->gid = new->cgid = egid; + id = idr_alloc(&ids->ipcs_idr, new, (next_id < 0) ? 0 : ipcid_to_idx(next_id), 0, GFP_NOWAIT); @@ -249,10 +253,6 @@ int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size) ids->in_use++; - current_euid_egid(&euid, &egid); - new->cuid = new->uid = euid; - new->gid = new->cgid = egid; - if (next_id < 0) { new->seq = ids->seq++; if (ids->seq > IPCID_SEQ_MAX) |