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>
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user