[CRIU] [PATCH] restorer: fix a race condition between access and unmap to task_entries

Pavel Emelyanov xemul at parallels.com
Mon Nov 26 09:46:26 EST 2012


On 11/23/2012 03:01 PM, Andrey Vagin wrote:
> If we have tree threads, a following situation can occur:
> 
> T2: dec task_entries->nr_in_progress
> T3: dec task_entries->nr_in_progress
> T3: futex(&task_entries->nr_in_progress, WAKE_UP);
> T1: unmap task_entries
> T2: futex(&task_entries->nr_in_progress, WAKE_UP) -> EFAULT -> BUG_ON()
> 
> This patch adds a futex for synchronising threads.
> 
> Signed-off-by: Andrey Vagin <avagin at openvz.org>

Applied


More information about the CRIU mailing list