提交 babf4770 编写于 作者: A Amir Goldstein 提交者: Miklos Szeredi

ovl: fix error handling in ovl_verify_set_fh()

We hit a BUG on kfree of an ERR_PTR()...

Reported-by: syzbot+ff03fe05c717b82502d0@syzkaller.appspotmail.com
Fixes: 8b88a2e6 ("ovl: verify upper root dir matches lower root dir")
Cc: <stable@vger.kernel.org> # v4.13
Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
上级 84df9525
...@@ -422,8 +422,10 @@ int ovl_verify_set_fh(struct dentry *dentry, const char *name, ...@@ -422,8 +422,10 @@ int ovl_verify_set_fh(struct dentry *dentry, const char *name,
fh = ovl_encode_real_fh(real, is_upper); fh = ovl_encode_real_fh(real, is_upper);
err = PTR_ERR(fh); err = PTR_ERR(fh);
if (IS_ERR(fh)) if (IS_ERR(fh)) {
fh = NULL;
goto fail; goto fail;
}
err = ovl_verify_fh(dentry, name, fh); err = ovl_verify_fh(dentry, name, fh);
if (set && err == -ENODATA) if (set && err == -ENODATA)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册