[SSI] openssi/kernel/fs/proc base.c,1.27,1.28
Roger Tsang <[email protected]>
| Newsgroups | gmane.linux.cluster.ssic.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ssic-linux/openssi/kernel/fs/proc
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv1388/fs/proc
Modified Files:
Tag: OPENSSI-FC
base.c
Log Message:
Multiple bug fixes. See ChangeLog.
Index: base.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/fs/proc/base.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- base.c 27 Oct 2009 03:18:30 -0000 1.27
+++ base.c 17 Dec 2009 06:43:51 -0000 1.28
@@ -1134,6 +1134,7 @@
if (current->fsuid != inode->i_uid && !capable(CAP_DAC_OVERRIDE))
goto out;
+
#ifdef CONFIG_SSI
error = PVPOP_PROCFS_READLINK(proc_vproc(inode),
proc_type(inode),
@@ -1193,6 +1194,7 @@
int error = -EACCES;
struct inode *inode = dentry->d_inode;
+ /* BKL held later in do_proc_links() */
/* lock_kernel(); */
if (current->fsuid != inode->i_uid && !capable(CAP_DAC_OVERRIDE))
@@ -1637,7 +1639,7 @@
*/
if (vproc_migrating(proc_vproc(inode))) {
#ifdef TASK_HOLD_VPROC
- if (PROC_I(inode)->task == NULL)
+ if (PROC_I(inode)->task != current)
goto out_bad; /* need to fill proc_dentry */
#endif
return 1;
@@ -1836,10 +1838,8 @@
ei = PROC_I(inode);
#ifdef CONFIG_SSI
ret = ssi_procfs_check_fd(proc_vproc(dir), fd, &f_mode);
- if (ret < 0) {
- iput(inode);
- return ERR_PTR(ret);
- }
+ if (ret < 0)
+ goto out_unlock;
inode->i_mode = S_IFLNK;
if (f_mode & 1)
inode->i_mode |= S_IRUSR | S_IXUSR;
@@ -1872,9 +1872,9 @@
out_unlock2:
spin_unlock(&files->file_lock);
put_files_struct(files);
+#endif
out_unlock:
iput(inode);
-#endif
out:
return ERR_PTR(-ENOENT);
}
@@ -2334,11 +2334,21 @@
if (proc_dentry != NULL) {
spin_lock(&dcache_lock);
+#ifdef KERNEL2616_53
+ spin_lock(&proc_dentry->d_lock);
+#endif
if (!d_unhashed(proc_dentry)) {
dget_locked(proc_dentry);
__d_drop(proc_dentry);
- } else
+#ifdef KERNEL2616_53
+ spin_unlock(&proc_dentry->d_lock);
+#endif
+ } else {
+#ifdef KERNEL2616_53
+ spin_unlock(&proc_dentry->d_lock);
+#endif
proc_dentry = NULL;
+ }
spin_unlock(&dcache_lock);
}
return proc_dentry;
@@ -3326,7 +3336,6 @@
VPROC_UNLOCK_EXCL(vp, "pvpop_proc_readlink");
#endif
#endif
- //if (error < 0)
if (error)
goto out;
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev