f2fs: fix potential use-after-free issue
authorChao Yu <yuchao0@huawei.com>
Thu, 23 Apr 2020 09:57:33 +0000 (17:57 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 12 May 2020 03:37:13 +0000 (20:37 -0700)
commitf3494345ce9999624b36109252a4bf5f00e51a46
treec57303ff36fddfdf9be78c0d1cbef9ba8bc2fef6
parent03382f1aa99f438f8e9dc7562c7368f55ba8f56c
f2fs: fix potential use-after-free issue

In error path of f2fs_read_multi_pages(), it should let last referrer
release decompress io context memory, otherwise, other referrer will
cause use-after-free issue.

Fixes: 4c8ff7095bef ("f2fs: support data compression")
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c