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:11:27 +0000 (12:11 -0400)
commit39be94ed0cf7ee0c51f8bcf701f01297c2ccc54e
tree35fd6fbb6d49ea71f8f4b393f835aa33cbbf11ae
parent661fb526fdecba782d96015b503ab47ba95d4545
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.030346 seconds and 4 git commands to generate.