Fix: urcu-bp: Bulletproof RCU arena resize bug
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 30 Sep 2013 15:49:32 +0000 (11:49 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 30 Sep 2013 16:10:29 +0000 (12:10 -0400)
commit9d8612b71148c42a430e1419bad3b9b09453f64a
tree35fd6fbb6d49ea71f8f4b393f835aa33cbbf11ae
parentf61dfd97f545ebbc45fafd96b57bdc6eb655716d
Fix: urcu-bp: Bulletproof RCU arena resize bug

> From: "Milosz Tanski" <milosz@adfin.com>

> While trying to use the BP flavor of RCU I ran into random crashes. I
> tracked it down to issues with resizing of the BP RCU memory pool.
>
> The problem is in the urcu-bp.c file in the resize_arena() function.
> On successful allocation / remapping the len member of the
> registry_arena struct is never set anywhere function. On the second
> resize of the arena the code in resize_arena() still thinks the
> previous size is equal to the original mapping size. I've fixed this
> issue locally by just adding the following code at the bottom of
> resize_arena().

Good catch !!

However, I think your fix misses one case: if we happen to re-use the
same region, we want to update the length too.

Reported-by: Milosz Tanski <milosz@adfin.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu-bp.c
This page took 0.035063 seconds and 4 git commands to generate.