Re: [PATCH 1/3] rcu: Return early if callback is not specified

From: Uladzislau Rezki
Date: Wed Jun 11 2025 - 05:24:25 EST


On Tue, Jun 10, 2025 at 03:33:32PM -0400, Joel Fernandes wrote:
>
>
> On 6/10/2025 1:34 PM, Uladzislau Rezki (Sony) wrote:
> > Currently the call_rcu() API does not check whether a callback
> > pointer is NULL. If NULL is passed, rcu_core() will try to invoke
> > it, resulting in NULL pointer dereference and a kernel crash.
> >
> > To prevent this and improve debuggability, this patch adds a check
> > for NULL and emits a kernel stack trace to help identify a faulty
> > caller.
> >
> > Signed-off-by: Uladzislau Rezki (Sony) <urezki@xxxxxxxxx>
>
> Reviewed-by: Joel Fernandes <joelagnelf@xxxxxxxxxx>
>
> I will add this first one (only this one since we're discussing the others) to a
> new rcu/fixes-for-6.16 branch, but let me know if any objections.
>
> Will push that branch out during -rc2 or -rc3 after sufficient testing.
>
Yep, that sounds good to me about rc-2/3 releases.

--
Uladzislau Rezki