Commit 8ff2c64
committed
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>1 parent f38cb9d commit 8ff2c64
2 files changed
Lines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3862 | 3862 | | |
3863 | 3863 | | |
3864 | 3864 | | |
| 3865 | + | |
3865 | 3866 | | |
3866 | 3867 | | |
3867 | | - | |
3868 | | - | |
3869 | 3868 | | |
3870 | 3869 | | |
3871 | 3870 | | |
| |||
3886 | 3885 | | |
3887 | 3886 | | |
3888 | 3887 | | |
3889 | | - | |
3890 | | - | |
| 3888 | + | |
| 3889 | + | |
3891 | 3890 | | |
3892 | 3891 | | |
3893 | 3892 | | |
3894 | 3893 | | |
3895 | | - | |
3896 | | - | |
| 3894 | + | |
| 3895 | + | |
| 3896 | + | |
3897 | 3897 | | |
3898 | 3898 | | |
3899 | 3899 | | |
3900 | 3900 | | |
| 3901 | + | |
| 3902 | + | |
| 3903 | + | |
| 3904 | + | |
| 3905 | + | |
| 3906 | + | |
| 3907 | + | |
| 3908 | + | |
| 3909 | + | |
3901 | 3910 | | |
3902 | 3911 | | |
3903 | 3912 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1123 | 1123 | | |
1124 | 1124 | | |
1125 | 1125 | | |
| 1126 | + | |
1126 | 1127 | | |
1127 | 1128 | | |
1128 | 1129 | | |
| |||
0 commit comments