From: Mathieu Desnoyers Date: Mon, 30 Sep 2013 15:49:32 +0000 (-0400) Subject: Fix: urcu-bp: Bulletproof RCU arena resize bug X-Git-Tag: v0.9.0~141 X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=commitdiff_plain;h=9d8612b71148c42a430e1419bad3b9b09453f64a;hp=9d8612b71148c42a430e1419bad3b9b09453f64a Fix: urcu-bp: Bulletproof RCU arena resize bug > From: "Milosz Tanski" > 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 Signed-off-by: Mathieu Desnoyers ---