diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-04 01:57:00 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 21:16:51 +0200 |
commit | ca469f35a8e9ef12571a4b80ac6d7fdc0260fb44 (patch) | |
tree | 228daeec1f54db72c32d64bf8b54413c65d0ab30 /fs/proc/internal.h | |
parent | procfs: preparations for remove_proc_entry() race fixes (diff) | |
download | linux-ca469f35a8e9ef12571a4b80ac6d7fdc0260fb44.tar.xz linux-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.h | 2 |
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 *); |