diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-10-20 11:26:33 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-10-20 11:26:33 -0700 |
commit | 09147a74376428080eddfed0cbce2cab205c2508 (patch) | |
tree | 7c903b82831eb03498dfc89c615e2acd5e1d9d6f /ipc/util.c | |
parent | e4bec9707eb7446e0cd1961f91e6948819327933 (diff) | |
parent | c2fab09b2ec32f252029757ba3353ea3d308c811 (diff) |
Merge branch 'test/linux-linaro-lsk-v3.18-android' of git://android.git.linaro.org/kernel/linaro-android into linux-linaro-lsk-v3.18-androidlsk-v3.18-15.10-android
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 88adc329888c..bc72cbf929da 100644 --- a/ipc/util.c +++ b/ipc/util.c @@ -277,6 +277,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); @@ -289,10 +293,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) |