X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=ipc%2Fsem.c;h=64ff4261f4e27dfca56edb3dab68cf52400a0624;hb=b488893a390edfe027bae7a46e9af8083e740668;hp=89bfdffb38d8f590818b28ae6844d0b40fb1095f;hpb=489de30259e667d7bc47da9da44a0270b050cd97;p=powerpc.git diff --git a/ipc/sem.c b/ipc/sem.c index 89bfdffb38..64ff4261f4 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -795,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); @@ -856,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) { @@ -1196,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); @@ -1211,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) @@ -1382,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();