mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 12:44:11 +08:00
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: 8b88a2e640
("ovl: verify upper root dir matches lower root dir")
Cc: <stable@vger.kernel.org> # v4.13
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
84df9525b0
commit
babf4770be
@ -422,8 +422,10 @@ int ovl_verify_set_fh(struct dentry *dentry, const char *name,
|
||||
|
||||
fh = ovl_encode_real_fh(real, is_upper);
|
||||
err = PTR_ERR(fh);
|
||||
if (IS_ERR(fh))
|
||||
if (IS_ERR(fh)) {
|
||||
fh = NULL;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
err = ovl_verify_fh(dentry, name, fh);
|
||||
if (set && err == -ENODATA)
|
||||
|
Loading…
Reference in New Issue
Block a user