Re: [PATCH bpf v2 2/8] libbpf: ringbuf: Prevent NULL callback crash

From: Tamir Duberstein

Date: Fri Nov 20 2026 - 15:43:48 EST


> ring_buffer__new() and ring_buffer__add() when callback is NULL or
> when overwrite map flag is present.

Iterator-only rings need construction with a NULL callback; v3 includes
that API. It preserves the merged consumption-time checks.

Overwrite registration remains unchanged. Both callback consumption and
the public iterator reject overwrite maps.