diff options
author | Hyeongseok Kim <hyeongseok@gmail.com> | 2020-11-12 12:14:54 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-12-03 09:00:20 +0300 |
commit | 89ff6005039a878afac87889fee748fa3f957c3a (patch) | |
tree | ae2e80cc688249a28f8a2c6e25a431bccf4d78e8 /fs/f2fs/super.c | |
parent | 34178b1bc4b5c936eab3adb4835578093095a571 (diff) | |
download | linux-89ff6005039a878afac87889fee748fa3f957c3a.tar.xz |
f2fs: fix double free of unicode map
In case of retrying fill_super with skip_recovery,
s_encoding for casefold would not be loaded again even though it's
already been freed because it's not NULL.
Set NULL after free to prevent double freeing when unmount.
Fixes: eca4873ee1b6 ("f2fs: Use generic casefolding support")
Signed-off-by: Hyeongseok Kim <hyeongseok@gmail.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r-- | fs/f2fs/super.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 00eff2f51807..fef22e476c52 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -3918,6 +3918,7 @@ free_bio_info: #ifdef CONFIG_UNICODE utf8_unload(sb->s_encoding); + sb->s_encoding = NULL; #endif free_options: #ifdef CONFIG_QUOTA |