summaryrefslogtreecommitdiffstats
path: root/net/ceph/messenger.c
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2023-07-08 16:16:59 +0200
committerIlya Dryomov <idryomov@gmail.com>2023-07-26 15:08:09 +0200
commit8ff2c64c9765446c3cef804fb99da04916603e27 (patch)
tree87805bd178c9f42cf311fc50e406ce6f9e7ef947 /net/ceph/messenger.c
parentrbd: make get_lock_owner_info() return a single locker or NULL (diff)
downloadlinux-8ff2c64c9765446c3cef804fb99da04916603e27.tar.xz
linux-8ff2c64c9765446c3cef804fb99da04916603e27.zip
rbd: harden get_lock_owner_info() a bit
- we want the exclusive lock type, so test for it directly - use sscanf() to actually parse the lock cookie and avoid admitting invalid handles - bail if locker has a blank address Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Diffstat (limited to '')
-rw-r--r--net/ceph/messenger.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index cd7b0bf5369e..5eb4898cccd4 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -1123,6 +1123,7 @@ bool ceph_addr_is_blank(const struct ceph_entity_addr *addr)
return true;
}
}
+EXPORT_SYMBOL(ceph_addr_is_blank);
int ceph_addr_port(const struct ceph_entity_addr *addr)
{