Summary: |
Incorrect handling of return value of posix_fallocate() |
Product: |
systemd
|
Reporter: |
Guillermo Vidal <guillermo.vidal> |
Component: |
general | Assignee: |
Lennart Poettering <lennart> |
Status: |
RESOLVED
FIXED
|
QA Contact: |
|
Severity: |
normal
|
|
|
Priority: |
medium
|
|
|
Version: |
unspecified | |
|
Hardware: |
Other | |
|
OS: |
All | |
|
Whiteboard: |
|
i915 platform:
|
|
i915 features:
|
|
Attachments: |
Proposed solution
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 61299 [details] Proposed solution According to the man pages of posix_fallocate, it returns zero on success or an error number on failure; however, errno is not set on failure. If the kernel or a library other than glibc does not support the function for example, EOPNOTSUPP will be returned and the error will not be handled properly with original code. Please see proposed solution attached.