diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 18:03:57 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 18:03:57 -0800 |
| commit | cc80f8f99c1ba16d54b0af64cb3911cd0146259e (patch) | |
| tree | bc033080018817d4095c2891c76e9c19c68c83bd /ipc | |
| parent | 8565fe850b04acbfdc4c24cdcafeed359bb0f2b3 (diff) | |
v2.4.2.4 -> v2.4.2.5
- Rik van Riel and others: mm rw-semaphore (ps/top ok when swapping)
- IDE: 256 sectors at a time is legal, but apparently confuses some
drives. Max out at 255 sectors instead.
- Petko Manolov: USB pegasus driver update
- make the boottime memory map printout at least almost readable.
- USB driver updates
- pte_alloc()/pmd_alloc() need page_table_lock.
Diffstat (limited to 'ipc')
| -rw-r--r-- | ipc/shm.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ipc/shm.c b/ipc/shm.c index b6558a8b5c93..c4af6517d9a4 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -71,7 +71,9 @@ static int shm_tot; /* total number of shared memory pages */ void __init shm_init (void) { ipc_init_ids(&shm_ids, 1); +#ifdef CONFIG_PROC_FS create_proc_read_entry("sysvipc/shm", 0, 0, sysvipc_shm_read_proc, NULL); +#endif } static inline int shm_checkid(struct shmid_kernel *s, int id) @@ -605,9 +607,9 @@ asmlinkage long sys_shmat (int shmid, char *shmaddr, int shmflg, ulong *raddr) shp->shm_nattch++; shm_unlock(shmid); - down(¤t->mm->mmap_sem); + down_write(¤t->mm->mmap_sem); user_addr = (void *) do_mmap (file, addr, file->f_dentry->d_inode->i_size, prot, flags, 0); - up(¤t->mm->mmap_sem); + up_write(¤t->mm->mmap_sem); down (&shm_ids.sem); if(!(shp = shm_lock(shmid))) @@ -636,14 +638,14 @@ asmlinkage long sys_shmdt (char *shmaddr) struct mm_struct *mm = current->mm; struct vm_area_struct *shmd, *shmdnext; - down(&mm->mmap_sem); + down_write(&mm->mmap_sem); for (shmd = mm->mmap; shmd; shmd = shmdnext) { shmdnext = shmd->vm_next; if (shmd->vm_ops == &shm_vm_ops && shmd->vm_start - (shmd->vm_pgoff << PAGE_SHIFT) == (ulong) shmaddr) do_munmap(mm, shmd->vm_start, shmd->vm_end - shmd->vm_start); } - up(&mm->mmap_sem); + up_write(&mm->mmap_sem); return 0; } |
