Messages in this thread Patch in this message | | | Date | Wed, 15 Mar 2000 02:58:22 +0100 (CET) | From | Ingo Molnar <> | Subject | [bugfix] SMP, shm-2.3.52-A0 |
| |
shm.c calls filp_open without the kernel lock held - this is illegal because the dentry code is not yet SMP-threaded. The attached patch (against pre3-2.3.52) fixes this.
Ingo --- linux/ipc/shm.c.orig2 Tue Mar 14 17:48:51 2000 +++ linux/ipc/shm.c Tue Mar 14 17:49:22 2000 @@ -1125,11 +1125,13 @@ if (IS_ERR (name)) return PTR_ERR (name); + lock_kernel(); file = filp_open (name, O_RDWR, 0); putname (name); - if (IS_ERR (file)) + if (IS_ERR (file)) { + unlock_kernel(); goto bad_file; - lock_kernel(); + } *raddr = do_mmap (file, addr, file->f_dentry->d_inode->i_size, (shmflg & SHM_RDONLY ? PROT_READ : PROT_READ | PROT_WRITE), flags, 0);
| |