projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pid namespaces: changes to show virtual ids to user
[powerpc.git]
/
ipc
/
sem.c
diff --git
a/ipc/sem.c
b/ipc/sem.c
index
d3e12ef
..
64ff426
100644
(file)
--- a/
ipc/sem.c
+++ b/
ipc/sem.c
@@
-75,7
+75,6
@@
#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/time.h>
#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/time.h>
-#include <linux/smp_lock.h>
#include <linux/security.h>
#include <linux/syscalls.h>
#include <linux/audit.h>
#include <linux/security.h>
#include <linux/syscalls.h>
#include <linux/audit.h>
@@
-122,7
+121,7
@@
static int sysvipc_sem_proc_show(struct seq_file *s, void *it);
#define sc_semopm sem_ctls[2]
#define sc_semmni sem_ctls[3]
#define sc_semopm sem_ctls[2]
#define sc_semmni sem_ctls[3]
-static void __
ipc_init __
sem_init_ns(struct ipc_namespace *ns, struct ipc_ids *ids)
+static void __sem_init_ns(struct ipc_namespace *ns, struct ipc_ids *ids)
{
ns->ids[IPC_SEM_IDS] = ids;
ns->sc_semmsl = SEMMSL;
{
ns->ids[IPC_SEM_IDS] = ids;
ns->sc_semmsl = SEMMSL;
@@
-133,7
+132,6
@@
static void __ipc_init __sem_init_ns(struct ipc_namespace *ns, struct ipc_ids *i
ipc_init_ids(ids, ns->sc_semmni);
}
ipc_init_ids(ids, ns->sc_semmni);
}
-#ifdef CONFIG_IPC_NS
int sem_init_ns(struct ipc_namespace *ns)
{
struct ipc_ids *ids;
int sem_init_ns(struct ipc_namespace *ns)
{
struct ipc_ids *ids;
@@
-165,7
+163,6
@@
void sem_exit_ns(struct ipc_namespace *ns)
kfree(ns->ids[IPC_SEM_IDS]);
ns->ids[IPC_SEM_IDS] = NULL;
}
kfree(ns->ids[IPC_SEM_IDS]);
ns->ids[IPC_SEM_IDS] = NULL;
}
-#endif
void __init sem_init (void)
{
void __init sem_init (void)
{
@@
-798,7
+795,7
@@
static int semctl_main(struct ipc_namespace *ns, int semid, int semnum,
for (un = sma->undo; un; un = un->id_next)
un->semadj[semnum] = 0;
curr->semval = val;
for (un = sma->undo; un; un = un->id_next)
un->semadj[semnum] = 0;
curr->semval = val;
- curr->sempid =
current->tgid
;
+ curr->sempid =
task_tgid_vnr(current)
;
sma->sem_ctime = get_seconds();
/* maybe some queued-up processes were waiting for this */
update_queue(sma);
sma->sem_ctime = get_seconds();
/* maybe some queued-up processes were waiting for this */
update_queue(sma);
@@
-859,7
+856,7
@@
static int semctl_down(struct ipc_namespace *ns, int semid, int semnum,
{
struct sem_array *sma;
int err;
{
struct sem_array *sma;
int err;
- struct sem_setbuf
setbuf
;
+ struct sem_setbuf
uninitialized_var(setbuf)
;
struct kern_ipc_perm *ipcp;
if(cmd == IPC_SET) {
struct kern_ipc_perm *ipcp;
if(cmd == IPC_SET) {
@@
-1199,7
+1196,7
@@
retry_undos:
if (error)
goto out_unlock_free;
if (error)
goto out_unlock_free;
- error = try_atomic_semop (sma, sops, nsops, un,
current->tgid
);
+ error = try_atomic_semop (sma, sops, nsops, un,
task_tgid_vnr(current)
);
if (error <= 0) {
if (alter && error == 0)
update_queue (sma);
if (error <= 0) {
if (alter && error == 0)
update_queue (sma);
@@
-1214,7
+1211,7
@@
retry_undos:
queue.sops = sops;
queue.nsops = nsops;
queue.undo = un;
queue.sops = sops;
queue.nsops = nsops;
queue.undo = un;
- queue.pid =
current->tgid
;
+ queue.pid =
task_tgid_vnr(current)
;
queue.id = semid;
queue.alter = alter;
if (alter)
queue.id = semid;
queue.alter = alter;
if (alter)
@@
-1385,7
+1382,7
@@
found:
semaphore->semval = 0;
if (semaphore->semval > SEMVMX)
semaphore->semval = SEMVMX;
semaphore->semval = 0;
if (semaphore->semval > SEMVMX)
semaphore->semval = SEMVMX;
- semaphore->sempid =
current->tgid
;
+ semaphore->sempid =
task_tgid_vnr(current)
;
}
}
sma->sem_otime = get_seconds();
}
}
sma->sem_otime = get_seconds();