diff -NurpP --minimal linux-2.6.19.7-vs2.2.0-rc19/fs/proc/base.c linux-2.6.19.7-vs2.2.0-rc19.3/fs/proc/base.c --- linux-2.6.19.7-vs2.2.0-rc19/fs/proc/base.c 2007-02-25 21:34:37 +0100 +++ linux-2.6.19.7-vs2.2.0-rc19.3/fs/proc/base.c 2007-03-25 00:10:06 +0100 @@ -1028,13 +1028,7 @@ static int pid_revalidate(struct dentry { struct inode *inode = dentry->d_inode; struct task_struct *task = get_proc_task(inode); - int ret = 0; - if (task) { - if (!vx_proc_task_visible(task)) - goto out_put; - - ret = 1; if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) || task_dumpable(task)) { inode->i_uid = task->euid; @@ -1045,12 +1039,11 @@ static int pid_revalidate(struct dentry } inode->i_mode &= ~(S_ISUID | S_ISGID); security_task_to_inode(task, inode); - out_put: put_task_struct(task); + return 1; } - if (!ret) - d_drop(dentry); - return ret; + d_drop(dentry); + return 0; } static int pid_delete_dentry(struct dentry * dentry) @@ -2036,8 +2029,7 @@ int proc_pid_readdir(struct file * filp, filp->f_pos = tgid + TGID_OFFSET; if (!vx_proc_task_visible(task)) continue; - if (proc_pid_fill_cache(filp, dirent, filldir, task, - vx_map_tgid(tgid)) < 0) { + if (proc_pid_fill_cache(filp, dirent, filldir, task, tgid) < 0) { put_task_struct(task); goto out; } @@ -2298,10 +2290,6 @@ static int proc_task_readdir(struct file task; task = next_tid(task), pos++) { tid = vx_map_pid(task->pid); - /* FIXME: could go away now - if (!vx_proc_task_visible(task)) - continue; */ - WARN_ON(!vx_proc_task_visible(task)); if (proc_task_fill_cache(filp, dirent, filldir, task, tid) < 0) { /* returning this tgid failed, save it as the first * pid for the next readir call */ diff -NurpP --minimal linux-2.6.19.7-vs2.2.0-rc19/include/linux/vs_pid.h linux-2.6.19.7-vs2.2.0-rc19.3/include/linux/vs_pid.h --- linux-2.6.19.7-vs2.2.0-rc19/include/linux/vs_pid.h 2006-12-04 05:21:53 +0100 +++ linux-2.6.19.7-vs2.2.0-rc19.3/include/linux/vs_pid.h 2007-03-24 23:54:18 +0100 @@ -74,7 +74,7 @@ visible: static inline struct task_struct *vx_find_proc_task_by_pid(int pid) { - struct task_struct *task = find_task_by_pid(pid); + struct task_struct *task = find_task_by_real_pid(pid); if (task && !vx_proc_task_visible(task)) { vxdprintk(VXD_CBIT(misc, 6),