]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: fix potential race in ceph_check_caps
authorJeff Layton <jlayton@kernel.org>
Fri, 20 Mar 2020 20:45:45 +0000 (16:45 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 1 Jun 2020 11:22:52 +0000 (13:22 +0200)
commit4e3921ce5f1014459828c6fefd0962a477b441bd
treea4f408a4f23b07ff2aab8a9875cdc84257a39f8a
parent48252c433156b88acaff3f882e41bc7e932e86f1
ceph: fix potential race in ceph_check_caps

Nothing ensures that session will still be valid by the time we
dereference the pointer. Take and put a reference.

In principle, we should always be able to get a reference here, but
throw a warning if that's ever not the case.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c