rbd: harden get_lock_owner_info() a bit

commit 8ff2c64c97 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>
This commit is contained in:
Ilya Dryomov 2023-07-08 16:16:59 +02:00 • committed by Greg Kroah-Hartman
commit bb25c5c0e4
2 changed files with 16 additions and 6 deletions