mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
ovl: relax WARN_ON() on rename to self
commit6889ee5a53
upstream. In ovl_rename(), if new upper is hardlinked to old upper underneath overlayfs before upper dirs are locked, user will get an ESTALE error and a WARN_ON will be printed. Changes to underlying layers while overlayfs is mounted may result in unexpected behavior, but it shouldn't crash the kernel and it shouldn't trigger WARN_ON() either, so relax this WARN_ON(). Reported-by: syzbot+bb1836a212e69f8e201a@syzkaller.appspotmail.com Fixes:804032fabb
("ovl: don't check rename to self") Cc: <stable@vger.kernel.org> # v4.9+ Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3e929ddf18
commit
f785f33c23
1 changed files with 1 additions and 1 deletions
|
@ -1174,7 +1174,7 @@ static int ovl_rename(struct inode *olddir, struct dentry *old,
|
|||
if (newdentry == trap)
|
||||
goto out_dput;
|
||||
|
||||
if (WARN_ON(olddentry->d_inode == newdentry->d_inode))
|
||||
if (olddentry->d_inode == newdentry->d_inode)
|
||||
goto out_dput;
|
||||
|
||||
err = 0;
|
||||
|
|
Loading…
Reference in a new issue