Fix: event notifier: racy use of last subbuffer record
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 4 Apr 2022 19:42:00 +0000 (15:42 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 3 Jun 2022 15:46:42 +0000 (11:46 -0400)
commite8474d9dd2d43b1e81998cd286e50ecd1a207920
tree5db47b3cbea490e81f9e597dd6c120da15981fb8
parent22882c095f5d24ad3d5f0b4ebaecfb6d1240727a
Fix: event notifier: racy use of last subbuffer record

The lttng-modules event notifiers use the ring buffer internally. When
reading the payload of the last event in a sub-buffer with a multi-part
read (e.g. two read system calls), we should not "put" the sub-buffer
holding this data, else continuing reading the data in the following
read system call can observe corrupted data if it has been concurrently
overwritten by the producer.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Idb051e50ee8a25958cfd63a9b143f4943ca2e01a
src/lttng-abi.c
This page took 0.031524 seconds and 4 git commands to generate.