X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=ipc%2Fsem.c;h=64ff4261f4e27dfca56edb3dab68cf52400a0624;hb=b488893a390edfe027bae7a46e9af8083e740668;hp=d3e12efd55cb39e6cdce7cd48ac73833100f60cf;hpb=7e23772f414cdbfb2a08aed237d6e926bb1cb728;p=powerpc.git diff --git a/ipc/sem.c b/ipc/sem.c index d3e12efd55..64ff4261f4 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -75,7 +75,6 @@ #include #include #include -#include #include #include #include @@ -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] -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; @@ -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); } -#ifdef CONFIG_IPC_NS 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; } -#endif 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; - 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); @@ -859,7 +856,7 @@ static int semctl_down(struct ipc_namespace *ns, int semid, int semnum, { 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) { @@ -1199,7 +1196,7 @@ retry_undos: 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); @@ -1214,7 +1211,7 @@ retry_undos: 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) @@ -1385,7 +1382,7 @@ found: 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();