Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
Lustre 2.15.2
-
None
-
3
-
9223372036854775807
Description
There are a couple off-by-one errors when calculating the required buffer size in oxe_can_hold(), which can cause the OSP xattr entry to be reallocated if it's not already present in the cache, e.g. in osp_xattr_get() it is first allocated in osp_oac_xattr_find_or_add()->osp_oac_xattr_alloc(), reallocated in osp_oac_xattr_assignment()->osp_oac_xattr_alloc() and the first entry is freed via osp_oac_xattr_assignment()->osp_oac_xattr_put().
00000004:00000001:0.0:1672773484.865928:0:70829:0:(osp_trans.c:495:osp_remote_sync()) Process leaving (rc=0 : 0 : 0)
00000004:00000010:0.0:1672773484.865929:0:70829:0:(osp_object.c:179:osp_oac_xattr_alloc()) kmalloced '(oxe)': 108 at 000000005f47abf6.
00000004:00000010:0.0:1672773484.865930:0:70829:0:(osp_object.c:179:osp_oac_xattr_alloc()) kmalloced '(oxe)': 108 at 00000000fd8ddabb.
00000004:00000010:0.0:1672773484.865930:0:70829:0:(osp_object.c:219:osp_oac_xattr_free()) kfreed 'oxe': 108 at 000000005f47abf6.
00000004:00000001:0.0:1672773484.865930:0:70829:0:(osp_object.c:1164:osp_xattr_get()) Process leaving via out (rc=56 : 56 : 0x38)