From: Mathieu Desnoyers Date: Thu, 3 Mar 2011 17:53:52 +0000 (-0500) Subject: finish_consuming_dead_subbuffer: fix data_size read race, reread new consumed count X-Git-Tag: v1.9.1~433 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=c74e3560aa89ea4dac242ceae06355f5a1ddc2c9;hp=c74e3560aa89ea4dac242ceae06355f5a1ddc2c9;p=lttng-ust.git finish_consuming_dead_subbuffer: fix data_size read race, reread new consumed count Make sure finish_consuming_dead_subbuffer always see a data_size that is non 0xffffffff only when the buffer data is entirely readable, else the code rely on the commit_seq counter which is the proper solution. The consumed count should be re-read in each test within the loop, otherwise the mathematic formula to get the amount of data to read does not work wrt buffer-size wrap-around. Signed-off-by: Mathieu Desnoyers ---