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>
Tue, 27 Oct 2020 21:25:23 +0000 (17:25 -0400)
commit3e75a9b7423589ec13cde387f98ed0ac5f59945f
tree76414f973ec8a402c326e342b858b2047196356b
parent0ee507ec0bd8168219e400cb5622931d86ac0c62
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/poll.c
This page took 0.024604 seconds and 4 git commands to generate.