aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfs/dir.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-05-05 20:20:25 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-05 20:20:25 -0400
commit1950267e6e9dc2531f2790bf217aa7aadc9aa324 (patch)
tree96f7d380de56e18c4ab16f820d999c51eed152c9 /fs/hfs/dir.c
parentf8ce1faf55955de62e0a12e330c6d9a526071f65 (diff)
hfs: SMP race on directory close()
->open_dir_list needs protection... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hfs/dir.c')
-rw-r--r--fs/hfs/dir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/hfs/dir.c b/fs/hfs/dir.c
index 17c22a8fd40a..e0101b6fb0d7 100644
--- a/fs/hfs/dir.c
+++ b/fs/hfs/dir.c
@@ -176,7 +176,9 @@ static int hfs_dir_release(struct inode *inode, struct file *file)
176{ 176{
177 struct hfs_readdir_data *rd = file->private_data; 177 struct hfs_readdir_data *rd = file->private_data;
178 if (rd) { 178 if (rd) {
179 mutex_lock(&inode->i_mutex);
179 list_del(&rd->list); 180 list_del(&rd->list);
181 mutex_unlock(&inode->i_mutex);
180 kfree(rd); 182 kfree(rd);
181 } 183 }
182 return 0; 184 return 0;