aboutsummaryrefslogtreecommitdiff
path: root/net/ceph
diff options
context:
space:
mode:
authorIlya Dryomov2023-07-08 16:16:59 +0200
committerGreg Kroah-Hartman2023-08-03 10:24:17 +0200
commit0c0b6412c96691bc3cc16f2f4b27591b327e627f (patch)
treec8eb388198ef3d66e8ab88bb8d654d36676c1bee /net/ceph
parentc0d067c79b238e1458689adc6a2ca31efaf6e7b7 (diff)
rbd: harden get_lock_owner_info() a bit
commit 8ff2c64c9765446c3cef804fb99da04916603e27 upstream. - 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ceph')
-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 dfa237fbd5a3..09feb3f1fcaa 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -1118,6 +1118,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)
{