diff options
author | Rich Felker <dalias@aerifal.cx> | 2018-12-11 16:41:09 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-12-11 16:41:09 -0500 |
commit | a9a9882fbe089a0a9f562d8ecd4c96e52b3548f1 (patch) | |
tree | 266162faa3efd53a5ed42ce3502e3de2e531142c /src/signal/block.c | |
parent | 8511511c583cf44ed3aa0bbcaab9168956dce493 (diff) | |
download | musl-a9a9882fbe089a0a9f562d8ecd4c96e52b3548f1.tar.gz musl-a9a9882fbe089a0a9f562d8ecd4c96e52b3548f1.tar.xz musl-a9a9882fbe089a0a9f562d8ecd4c96e52b3548f1.zip |
don't create aio queue/map structures for invalid file descriptors
the map structures in particular are permanent once created, and thus a large number of aio function calls with invalid file descriptors could exhaust memory, whereas, assuming normal resource limits, only a very small number of entries ever need to be allocated. check validity of the fd before allocating anything new, so that allocation of large amounts of memory is only possible when resource limits have been increased and a large number of files are actually open. this change also improves error reporting for bad file descriptors to happen at the time the aio submission call is made, as opposed to asynchronously.
Diffstat (limited to 'src/signal/block.c')
0 files changed, 0 insertions, 0 deletions