Actions
Bug #6504
closedPATCH: Fix double-free of fiemap
% Done:
0%
Source:
Community (dev)
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
If GenericFileStoreBackend::do_fiemap returns anything other than 0, then fiemap will not be allocated. However, GenericFileStoreBackend::detect_features will free fiemap regardless, triggering an assertion in tcmalloc. The attached patch will fix the bug by only freeing fiemap when necessary.
In my case, do_fiemap returns -ENOSYS because fiemap is not implemented on FreeBSD. However, this bug could also happen on Linux when do_fiemap returns -ENOMEM.
Files
Actions