Fix: sessiond: off-by-one poll check when draining an event notifier
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 12 Mar 2021 19:54:52 +0000 (14:54 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 12 Mar 2021 20:02:00 +0000 (15:02 -0500)
commita17b133bc868e046f285146e26a5bbe2a569b892
treeb647c21ad63a1f4c1b5bd2399d3708b9d5d2b763
parentd28fcdec589e6f0c98fed2f6c094defec58e2b24
Fix: sessiond: off-by-one poll check when draining an event notifier

When an event source is removed (on the death of an application), the
notification thread "drains" any remaining notifications from the
event notifier pipe.

In doing so, it creates a new poll set containing the event source to
check if messages are left in the event notification pipe.

The invocation of `LTTNG_POLL_GETEV(&events, 1)` means to check the
events pending for the first (and only) fd in the poll set. This check
is off by one since `0` should be used.

For some reason, this worked everywhere except when using a 32-bit
userland on a 64-bit kernel (on x86_64).

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I6f274fdd7c80d5676fd48ae20a14adb3cc010142
src/bin/lttng-sessiond/notification-thread-events.c
This page took 0.02669 seconds and 5 git commands to generate.