diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-05-28 16:57:32 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-05-31 11:31:52 -0700 |
commit | 250dbf515192811025c4f3ba764a985f9b95be8e (patch) | |
tree | 387694a4b8840e81b04b601143333a6a7fdeaedf /fs/nfs | |
parent | aec2f729fca13661e9bc651839ae23bf8367195a (diff) | |
download | linux-250dbf515192811025c4f3ba764a985f9b95be8e.tar.gz linux-250dbf515192811025c4f3ba764a985f9b95be8e.tar.bz2 linux-250dbf515192811025c4f3ba764a985f9b95be8e.zip |
f2fs: fix to avoid race during access gc_thread pointer
Thread A Thread B
- f2fs_remount
- stop_gc_thread
- f2fs_sbi_store
sbi->gc_thread = NULL;
access sbi->gc_thread->gc_*
Previously, we allocate memory for sbi->gc_thread based on background
gc thread mount option, the memory can be released if we turn off
that mount option, but still there are several places access gc_thread
pointer without considering race condition, result in NULL point
dereference.
In order to fix this issue, use sb->s_umount to exclude those operations.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/nfs')
0 files changed, 0 insertions, 0 deletions