about summary refs log tree commit diff
path: root/include/signal.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-12-11 16:41:09 -0500
committerRich Felker <dalias@aerifal.cx>2018-12-11 16:41:09 -0500
commita9a9882fbe089a0a9f562d8ecd4c96e52b3548f1 (patch)
tree266162faa3efd53a5ed42ce3502e3de2e531142c /include/signal.h
parent8511511c583cf44ed3aa0bbcaab9168956dce493 (diff)
downloadmusl-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 'include/signal.h')
0 files changed, 0 insertions, 0 deletions