diff options
author | Nathan Hjelm <hjelmn@google.com> | 2019-08-14 14:00:41 -0700 |
---|---|---|
committer | Nathan Hjelm <hjelmn@google.com> | 2019-08-14 14:00:41 -0700 |
commit | dd7df2b75118c920cb21b4442983168e8b2f14ac (patch) | |
tree | f5f156131b199becd8a24c34669f18e2d5d79eec /libusb/version_nano.h | |
parent | afadbc7a89f49b70a09d0d809853777ce3a135bf (diff) | |
download | libusb-dd7df2b75118c920cb21b4442983168e8b2f14ac.tar.gz |
core: protect against changes to the pollfd list during handle_events
It is possible a file descriptor to be removed due to a close and the
same file descriptor value to be added during the same event loop. This
can cause the backend to get a stale revent and incorrectly remove the
file descriptor.
This commit addresses the issue by delaying the actual removal of the
ipollfds entry until just before the backend handle_events is called.
handle_events then goes through the list of closed fds and clears out
the revents associated with the closed file descriptor.
Signed-off-by: Nathan Hjelm <hjelmn@google.com>
Diffstat (limited to 'libusb/version_nano.h')
-rw-r--r-- | libusb/version_nano.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 1ff7ca7..a71854b 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11390 +#define LIBUSB_NANO 11391 |