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
Updated by Ian Colle over 10 years ago
- Status changed from New to Fix Under Review
- Assignee set to Samuel Just
Updated by Noah Watkins over 10 years ago
This patch works for me to solve the same problem on OSX.
Updated by Sage Weil over 10 years ago
- Status changed from Fix Under Review to Resolved
moved one of the free(fiemap) calls in a block and then merged to master. thanks!
Actions