ceph: fix potential use-after-free
authorYan, Zheng <zyan@redhat.com>
Wed, 29 Mar 2017 07:30:24 +0000 (15:30 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 4 May 2017 07:19:20 +0000 (09:19 +0200)
commit0a07fc8cd01b6838d999a5eacaa99fe90b8f768b
tree266cad4b91bc6eaf3be28e749e3228c1baf37a83
parent76201b6354bb3aa31c7ba2bd42b9cbb8dda71c44
ceph: fix potential use-after-free

__unregister_session() free the session if it drops the last
reference. We should grab an extra reference if we want to use
session after __unregister_session().

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c