diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2016-03-21 17:31:44 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-07-27 09:47:40 -0700 |
commit | dbf72a4d4531e7e5fb28e76d902d66f05c1bfe12 (patch) | |
tree | c19301388d1a4349958bb8a67fe6f081fe409e38 /init/do_mounts.c | |
parent | 38da63ef2c131593ff89372048c14cd8bd1fe4b4 (diff) |
ovl: verify upper dentry before unlink and rename
commit 11f3710417d026ea2f4fcf362d866342c5274185 upstream.
Unlink and rename in overlayfs checked the upper dentry for staleness by
verifying upper->d_parent against upperdir. However the dentry can go
stale also by being unhashed, for example.
Expand the verification to actually look up the name again (under parent
lock) and check if it matches the upper dentry. This matches what the VFS
does before passing the dentry to filesytem's unlink/rename methods, which
excludes any inconsistency caused by overlayfs.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'init/do_mounts.c')
0 files changed, 0 insertions, 0 deletions