diff options
author | chenying <chenying.kernel@bytedance.com> | 2021-08-16 18:02:56 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-09-22 11:48:09 +0200 |
commit | 1bc41e47e0ee05367b2efbdd95bdc2d4e7fcc164 (patch) | |
tree | e53e658162b121573b911e8166fa11210b3fc7c5 /ipc | |
parent | 07f2e0249db3f7bdf91633c4e04be6b11e5a8ed4 (diff) | |
download | linux-stable-1bc41e47e0ee05367b2efbdd95bdc2d4e7fcc164.tar.gz linux-stable-1bc41e47e0ee05367b2efbdd95bdc2d4e7fcc164.tar.bz2 linux-stable-1bc41e47e0ee05367b2efbdd95bdc2d4e7fcc164.zip |
ovl: fix BUG_ON() in may_delete() when called from ovl_cleanup()
commit 52d5a0c6bd8a89f460243ed937856354f8f253a3 upstream.
If function ovl_instantiate() returns an error, ovl_cleanup will be called
and try to remove newdentry from wdir, but the newdentry has been moved to
udir at this time. This will causes BUG_ON(victim->d_parent->d_inode !=
dir) in fs/namei.c:may_delete.
Signed-off-by: chenying <chenying.kernel@bytedance.com>
Fixes: 01b39dcc9568 ("ovl: use inode_insert5() to hash a newly created inode")
Link: https://lore.kernel.org/linux-unionfs/e6496a94-a161-dc04-c38a-d2544633acb4@bytedance.com/
Cc: <stable@vger.kernel.org> # v4.18
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions