]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ovl: Fix dereferencing possible ERR_PTR()
authorDing Xiang <dingxiang@cmss.chinamobile.com>
Mon, 9 Sep 2019 08:29:56 +0000 (16:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 11:14:12 +0000 (13:14 +0200)
commitee080509c14e59ac0f105d2f119881fbde7f1991
tree792dbf3b78f755c8a9afe51e3447d896d82546cd
parente2a5e040a63b6c4d4823c3c833e6d5e204774b61
ovl: Fix dereferencing possible ERR_PTR()

commit 97f024b9171e74c4443bbe8a8dce31b917f97ac5 upstream.

if ovl_encode_real_fh() fails, no memory was allocated
and the error in the error-valued pointer should be returned.

Fixes: 9b6faee07470 ("ovl: check ERR_PTR() return value from ovl_encode_fh()")
Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
Cc: <stable@vger.kernel.org> # v4.16+
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/overlayfs/export.c