aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/internal.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-04-03 19:57:00 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-04-09 15:16:51 -0400
commitca469f35a8e9ef12571a4b80ac6d7fdc0260fb44 (patch)
tree228daeec1f54db72c32d64bf8b54413c65d0ab30 /fs/proc/internal.h
parentprocfs: preparations for remove_proc_entry() race fixes (diff)
downloadlinux-dev-ca469f35a8e9ef12571a4b80ac6d7fdc0260fb44.tar.xz
linux-dev-ca469f35a8e9ef12571a4b80ac6d7fdc0260fb44.zip
deal with races between remove_proc_entry() and proc_reg_release()
* serialize the call of ->release() on per-pdeo mutex * don't remove pdeo from per-pde list until we are through with it Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to '')
-rw-r--r--fs/proc/internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index c43d536f93b9..e2fa9345a9a8 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -153,6 +153,8 @@ int proc_readdir_de(struct proc_dir_entry *de, struct file *filp, void *dirent,
struct pde_opener {
struct file *file;
struct list_head lh;
+ int count; /* number of threads in close_pdeo() */
+ struct mutex mutex;
};
ssize_t __proc_file_read(struct file *, char __user *, size_t, loff_t *);