]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rcu: Return early if callback is not specified
authorUladzislau Rezki (Sony) <urezki@gmail.com>
Tue, 10 Jun 2025 17:34:48 +0000 (19:34 +0200)
committerJoel Fernandes <joelagnelf@nvidia.com>
Fri, 20 Jun 2025 19:31:48 +0000 (15:31 -0400)
commit33b6a1f155d627f5bd80c7485c598ce45428f74f
treedc4a2892a5c619284e704d16dcb5fd67d4a362f7
parent11313e2f78128c948e9b4eb58b3dacfc30964700
rcu: Return early if callback is not specified

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@gmail.com>
Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
kernel/rcu/tree.c