ceph: fix potential use-after-free in ceph_mdsc_build_path
authorJeff Layton <jlayton@kernel.org>
Fri, 26 Apr 2019 17:33:39 +0000 (13:33 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 7 May 2019 17:22:37 +0000 (19:22 +0200)
commit69a10fb3f4b8769ffd44e4eaa662ab691fa61f4c
tree5a3503f0c6662a5767fecb4da4a41c45301493b8
parentff4a80bf2d3f8005dc5890381bc8ca48e259c60d
ceph: fix potential use-after-free in ceph_mdsc_build_path

temp is not defined outside of the RCU critical section here. Ensure
we grab that value before we drop the rcu_read_lock.

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c