Re: [RFC PATCH 09/12] rcu_txn: Test a list writer against concurrent readers

From: Mathieu Desnoyers

Date: Tue Nov 10 2026 - 10:24:30 EST


On 2026-10-23 14:22, Puranjay Mohan wrote:
[...]
prev_key already skips the first step, so I'd count back == &head->node as a violation.

Agreed. Counting it is planned for the next version.

[...]
If the writer oopses, KUnit fails the test and frees c and the readers
array while these threads are still walking the list. Registering the
stop with kunit_add_action_or_reset(), and calling
kunit_release_action() where they're stopped now, would avoid the
use-after-free.

Planned for the next version, as you describe.
[...]
A failed conc_del() here leaks the node without anyone noticing. The
readers are already stopped at this point, so the leftovers could just
be kfree()d.

In the next version, a delete will no longer fail. The test will unlink
and free the leftovers directly, without a grace period.

Thanks,

Mathieu

--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com