summaryrefslogtreecommitdiff
path: root/include/linux/overflow.h
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-05-28 16:57:32 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2018-07-08 17:46:54 -0700
commita1259450b6dba27306a065b4e079d8fb234d0a4e (patch)
tree11b103cc45141ef1cdfcd653734781a745c1cac3 /include/linux/overflow.h
parentd2e0f2f786a68136d2fb5c57c669896eba2f4d7f (diff)
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 'include/linux/overflow.h')
0 files changed, 0 insertions, 0 deletions