diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-06 02:20:25 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-06 02:20:25 +0200 |
commit | 1950267e6e9dc2531f2790bf217aa7aadc9aa324 (patch) | |
tree | 96f7d380de56e18c4ab16f820d999c51eed152c9 /fs | |
parent | Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kern... (diff) | |
download | linux-1950267e6e9dc2531f2790bf217aa7aadc9aa324.tar.xz linux-1950267e6e9dc2531f2790bf217aa7aadc9aa324.zip |
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')
-rw-r--r-- | fs/hfs/dir.c | 2 |
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) { struct hfs_readdir_data *rd = file->private_data; if (rd) { + mutex_lock(&inode->i_mutex); list_del(&rd->list); + mutex_unlock(&inode->i_mutex); kfree(rd); } return 0; |