Searched hist:"11 f37104" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/fs/overlayfs/ |
H A D | dir.c | 11f37104 Mon Mar 21 11:31:44 CDT 2016 Miklos Szeredi <mszeredi@redhat.com> ovl: verify upper dentry before unlink and rename
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> 11f37104 Mon Mar 21 11:31:44 CDT 2016 Miklos Szeredi <mszeredi@redhat.com> ovl: verify upper dentry before unlink and rename 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>
|