Files
linux/kernel
Paul E. McKenney 5cdfd174ea srcu: Check for in-flight callbacks in _cleanup_srcu_struct()
If someone fails to drain the corresponding SRCU callbacks (for
example, by failing to invoke srcu_barrier()) before invoking either
cleanup_srcu_struct() or cleanup_srcu_struct_quiesced(), the resulting
diagnostic is an ambiguous use-after-free diagnostic, and even then
only if you are running something like KASAN.  This commit therefore
improves SRCU diagnostics by adding checks for in-flight callbacks at
_cleanup_srcu_struct() time.

Note that these diagnostics can still be defeated, for example, by
invoking call_srcu() concurrently with cleanup_srcu_struct().  Which is
a really bad idea, but sometimes all too easy to do.  But even then,
these diagnostics have at least some probability of catching the problem.

Reported-by: Sagi Grimberg <[email protected]>
Reported-by: Bart Van Assche <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
Tested-by: Bart Van Assche <[email protected]>
2019-03-26 14:39:24 -07:00
..
…
…
…
…
…
…
…
…
2019-02-01 20:55:38 +01:00
…
…
…
…
…
2018-12-28 12:42:30 -08:00
2018-10-31 08:54:16 -07:00
…
…
…
…
…
…
…
2019-01-11 18:05:40 -08:00
…