lkml.org 
[lkml]   [2000]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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);
\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.049 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site