diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-03 23:57:00 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 19:16:51 (GMT) |
commit | ca469f35a8e9ef12571a4b80ac6d7fdc0260fb44 (patch) | |
tree | 228daeec1f54db72c32d64bf8b54413c65d0ab30 /fs/proc/internal.h | |
parent | 866ad9a747bbf5461739fcae6d0a41c8971bbe1d (diff) | |
download | linux-ca469f35a8e9ef12571a4b80ac6d7fdc0260fb44.tar.xz |
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 'fs/proc/internal.h')
-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 c43d536..e2fa934 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 *); |