ceph: fix use-after-free on symlink traversal
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 26 Mar 2019 01:38:58 +0000 (01:38 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 27 Mar 2019 18:00:37 +0000 (19:00 +0100)
commitdaf5cc27eed99afdea8d96e71b89ba41f5406ef6
tree388c0f95be488d43a4576b871657e38dfc7740e2
parent187df76325af5d9e12ae9daec1510307797e54f0
ceph: fix use-after-free on symlink traversal

free the symlink body after the same RCU delay we have for freeing the
struct inode itself, so that traversal during RCU pathwalk wouldn't step
into freed memory.

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