Fix: common: poll: compat_poll_wait never finishes
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 16 Oct 2020 18:43:39 +0000 (14:43 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 28 Oct 2020 20:23:57 +0000 (16:23 -0400)
commit13c4d8aba5eca5f0d70a42661731d2de6bdc02a4
tree33025e8d4bfa1bb923727ca02d24529531677580
parent9cd8e997a00a4dabe837f5c57fc0c0930833471f
Fix: common: poll: compat_poll_wait never finishes

compat_poll_wait hangs when poll returns an array of file
descriptors of the form:
  [ Inactive Active ]

The logic to find the first idle pollfd entry is bogus and actually
skips the first idle entry. This causes the follow-up loop to never
conclude.

The pollfd array defragmentation logic is re-written in a simpler
style to handle those cases appropriately.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I8669a870df1ec1160f05e35e83671917bb80d6f9
src/common/compat/compat-poll.c
This page took 0.02631 seconds and 4 git commands to generate.