diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-09-28 22:25:29 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-09-28 22:25:29 +0000 |
commit | 0ae8dceaebe3659ee0c3352c08125f403e77ebca (patch) | |
tree | 5085c389f09da78182b899d19fe1068b619a69dd /ipc | |
parent | 273767781288c35c9d679e908672b9996cda4c34 (diff) |
Merge with 2.3.10.
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/shm.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -381,8 +381,7 @@ static struct vm_operations_struct shm_vm_ops = { NULL, /* advise */ shm_nopage, /* nopage */ NULL, /* wppage */ - shm_swapout, /* swapout */ - NULL /* swapin */ + shm_swapout /* swapout */ }; /* Insert shmd into the list shp->attaches */ @@ -548,6 +547,7 @@ static void shm_open (struct vm_area_struct *shmd) unsigned int id; struct shmid_kernel *shp; + lock_kernel(); id = SWP_OFFSET(shmd->vm_pte) & SHM_ID_MASK; shp = shm_segs[id]; if (shp == IPC_UNUSED) { @@ -558,6 +558,7 @@ static void shm_open (struct vm_area_struct *shmd) shp->u.shm_nattch++; shp->u.shm_atime = CURRENT_TIME; shp->u.shm_lpid = current->pid; + unlock_kernel(); } /* @@ -571,6 +572,7 @@ static void shm_close (struct vm_area_struct *shmd) struct shmid_kernel *shp; int id; + lock_kernel(); /* remove from the list of attaches of the shm segment */ id = SWP_OFFSET(shmd->vm_pte) & SHM_ID_MASK; shp = shm_segs[id]; @@ -579,6 +581,7 @@ static void shm_close (struct vm_area_struct *shmd) shp->u.shm_dtime = CURRENT_TIME; if (--shp->u.shm_nattch <= 0 && shp->u.shm_perm.mode & SHM_DEST) killseg (id); + unlock_kernel(); } /* |