]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
f2fs: fix a panic caused by NULL flush_cmd_control
authorYunlei He <heyunlei@huawei.com>
Thu, 1 Jun 2017 08:43:51 +0000 (16:43 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Dec 2018 13:09:51 +0000 (14:09 +0100)
commit0fd7726d69afb0b61817f8d51e80f385cbfb2b10
tree80703336070ccd974751cdf8902e4508cce300fe
parent985ee65d554c2c48107b929b26e28fae2b946809
f2fs: fix a panic caused by NULL flush_cmd_control

commit d4fdf8ba0e5808ba9ad6b44337783bd9935e0982 upstream.

Mount fs with option noflush_merge, boot failed for illegal address
fcc in function f2fs_issue_flush:

        if (!test_opt(sbi, FLUSH_MERGE)) {
                ret = submit_flush_wait(sbi);
                atomic_inc(&fcc->issued_flush);   ->  Here, fcc illegal
                return ret;
        }

Signed-off-by: Yunlei He <heyunlei@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
[bwh: Backported to 4.9: adjust context]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/segment.c