diff -u linux-2.6.18.1-vs2.1.1-rc43-X2/fs/proc/base.c linux-2.6.18.1-vs2.1.1-rc43-X2/fs/proc/base.c --- linux-2.6.18.1-vs2.1.1-rc43-X2/fs/proc/base.c 2006-10-27 20:15:44.000000000 -0500 +++ linux-2.6.18.1-vs2.1.1-rc43-X2/fs/proc/base.c 2006-10-27 20:15:44.000000000 -0500 @@ -1861,25 +1861,35 @@ #endif case PROC_TID_VX_INFO: case PROC_TGID_VX_INFO: + if (task_vx_flags(task, VXF_HIDE_VINFO, 0)) + goto out_noent; inode->i_fop = &proc_info_file_operations; ei->op.proc_read = proc_pid_vx_info; break; case PROC_TID_IP_INFO: case PROC_TGID_IP_INFO: + if (task_vx_flags(task, VXF_HIDE_VINFO, 0)) + goto out_noent; inode->i_fop = &proc_info_file_operations; ei->op.proc_read = proc_pid_nx_info; break; default: printk("procfs: impossible type (%d)",p->type); - iput(inode); error = ERR_PTR(-EINVAL); - goto out; + goto out_put; } dentry->d_op = &pid_dentry_operations; d_add(dentry, inode); /* Close the race of the process dying before we return the dentry */ - if (pid_revalidate(dentry, NULL)) + if (pid_revalidate(dentry, NULL)) { error = NULL; + goto out; + } + +out_noent: + error=ERR_PTR(-ENOENT); +out_put: + iput(inode); out: put_task_struct(task); out_no_task: