]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RCU pathwalk breakage when running into a symlink overmounting something
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 24 Apr 2015 19:47:07 +0000 (15:47 -0400)
committerSasha Levin <sasha.levin@oracle.com>
Sun, 17 May 2015 23:12:25 +0000 (19:12 -0400)
commitc5f77349d6694a2ce04536343fee87a0de74522d
tree3c5c56fa1ddcc9d73868dbde59e622df85a8e9cc
parent3d46720fc10e8270d003fa8e55f2e89c14af9261
RCU pathwalk breakage when running into a symlink overmounting something

[ Upstream commit 3cab989afd8d8d1bc3d99fef0e7ed87c31e7b647 ]

Calling unlazy_walk() in walk_component() and do_last() when we find
a symlink that needs to be followed doesn't acquire a reference to vfsmount.
That's fine when the symlink is on the same vfsmount as the parent directory
(which is almost always the case), but it's not always true - one _can_
manage to bind a symlink on top of something.  And in such cases we end up
with excessive mntput().

Cc: stable@vger.kernel.org # since 2.6.39
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
fs/namei.c