pid namespaces: changes to show virtual ids to user
[linux-2.6-block.git] / ipc / shm.c
index 5fc5cf50cf1b847fc630cf2e127f37005337bb94..b9d272900a1e64c1572776b0c6fa5750ea308f0e 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -168,7 +168,7 @@ static void shm_open(struct vm_area_struct *vma)
        shp = shm_lock(sfd->ns, sfd->id);
        BUG_ON(!shp);
        shp->shm_atim = get_seconds();
-       shp->shm_lprid = current->tgid;
+       shp->shm_lprid = task_tgid_vnr(current);
        shp->shm_nattch++;
        shm_unlock(shp);
 }
@@ -213,7 +213,7 @@ static void shm_close(struct vm_area_struct *vma)
        /* remove from the list of attaches of the shm segment */
        shp = shm_lock(ns, sfd->id);
        BUG_ON(!shp);
-       shp->shm_lprid = current->tgid;
+       shp->shm_lprid = task_tgid_vnr(current);
        shp->shm_dtim = get_seconds();
        shp->shm_nattch--;
        if(shp->shm_nattch == 0 &&
@@ -392,7 +392,7 @@ static int newseg (struct ipc_namespace *ns, key_t key, int shmflg, size_t size)
        if(id == -1) 
                goto no_id;
 
-       shp->shm_cprid = current->tgid;
+       shp->shm_cprid = task_tgid_vnr(current);
        shp->shm_lprid = 0;
        shp->shm_atim = shp->shm_dtim = 0;
        shp->shm_ctim = get_seconds();