diff options
| author | Ingo Molnar <mingo@kernel.org> | 2015-10-12 14:52:34 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2015-10-12 14:52:34 +0200 |
| commit | cdbcd239e2e264dc3ef7bc7865bcb8ec0023876f (patch) | |
| tree | 94f5d2cf92ebb2eee640862cb2beaab6503bf846 /ipc/util.c | |
| parent | 6e06780a98f149f131d46c1108d4ae27f05a9357 (diff) | |
| parent | 7e0abcd6b7ec1452bf4a850fccbae44043c05806 (diff) | |
Merge branch 'x86/ras' into ras/core, to pick up 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) |
