diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-10-09 16:13:30 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-10-09 16:13:30 -0400 |
commit | 670aee3fc7ac37ae947f8b582d87b51d5fa36524 (patch) | |
tree | 9885998483d4506208e5aef9c13c8a86adea20bb /ipc/util.c | |
parent | d61e87ac53292a3138b4354b687558973686b6ca (diff) | |
parent | 55582bccdc1e89ecc973c260d46e247df675d4df (diff) |
Merge branches 'pm-devfreq' and 'pm-cpufreq'
* pm-devfreq:
PM / devfreq: fix double kfree
PM / devfreq: Fix governor_store()
* pm-cpufreq:
cpufreq: prevent lockup on reading scaling_available_frequencies
cpufreq: acpi_cpufreq: prevent crash on reading freqdomain_cpus
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) | |||
237 | rcu_read_lock(); | 237 | rcu_read_lock(); |
238 | spin_lock(&new->lock); | 238 | spin_lock(&new->lock); |
239 | 239 | ||
240 | current_euid_egid(&euid, &egid); | ||
241 | new->cuid = new->uid = euid; | ||
242 | new->gid = new->cgid = egid; | ||
243 | |||
240 | id = idr_alloc(&ids->ipcs_idr, new, | 244 | id = idr_alloc(&ids->ipcs_idr, new, |
241 | (next_id < 0) ? 0 : ipcid_to_idx(next_id), 0, | 245 | (next_id < 0) ? 0 : ipcid_to_idx(next_id), 0, |
242 | GFP_NOWAIT); | 246 | GFP_NOWAIT); |
@@ -249,10 +253,6 @@ int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size) | |||
249 | 253 | ||
250 | ids->in_use++; | 254 | ids->in_use++; |
251 | 255 | ||
252 | current_euid_egid(&euid, &egid); | ||
253 | new->cuid = new->uid = euid; | ||
254 | new->gid = new->cgid = egid; | ||
255 | |||
256 | if (next_id < 0) { | 256 | if (next_id < 0) { |
257 | new->seq = ids->seq++; | 257 | new->seq = ids->seq++; |
258 | if (ids->seq > IPCID_SEQ_MAX) | 258 | if (ids->seq > IPCID_SEQ_MAX) |