Re: [RFC PATCH v2 3/3] restartable sequences: basic self-tests

From: Peter Zijlstra
Date: Wed Apr 06 2016 - 15:25:47 EST


On Wed, Apr 06, 2016 at 01:39:22PM +0000, Mathieu Desnoyers wrote:
> There is still the question of use-after-free however that
> remains open. My understanding is that this lock-free list
> should be paired with either a type-safe memory allocator,
> using RCU, or a garbage collector.

Yeah, it looks that way indeed, there no sane way to fix that either,
even if you stick all this inside the rseq_start/finish thing you'll get
use-after-free, because we'll not restart until rseq_finish fails.