linux-yocto/kernel/rcu
Uladzislau Rezki (Sony) 817662f9bd rcu: Return early if callback is not specified
[ Upstream commit 33b6a1f155 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-07-10 16:03:17 +02:00
..
Kconfig
Kconfig.debug
Makefile
rcu_segcblist.c
rcu_segcblist.h
rcu.h rcu: Dump memory object info if callback function is invalid 2024-08-29 17:33:23 +02:00
rcuscale.c rcuscale: Do a proper cleanup if kfree_scale_init() fails 2024-12-09 10:31:50 +01:00
rcutorture.c rcutorture: Fix rcu_torture_fwd_cb_cr() data race 2024-08-14 13:58:41 +02:00
refscale.c refscale: Add a "jiffies" test 2023-07-14 15:01:04 -07:00
srcutiny.c rcu: Dump memory object info if callback function is invalid 2024-08-29 17:33:23 +02:00
srcutree.c rcu: Dump memory object info if callback function is invalid 2024-08-29 17:33:23 +02:00
sync.c
tasks.h rcu-tasks: Fix access non-existent percpu rtpcp variable in rcu_tasks_need_gpcb() 2024-11-08 16:28:22 +01:00
tiny.c rcu: Dump memory object info if callback function is invalid 2024-08-29 17:33:23 +02:00
tree_exp.h rcu/exp: Handle RCU expedited grace period kworker allocation failure 2024-03-26 18:19:17 -04:00
tree_nocb.h rcu/nocb: Fix rcuog wake-up from offline softirq 2024-10-17 15:24:30 +02:00
tree_plugin.h rcu: handle unstable rdp in rcu_read_unlock_strict() 2025-06-04 14:42:13 +02:00
tree_stall.h rcu/cpu_stall_cputime: fix the hardirq count for x86 architecture 2025-06-19 15:28:03 +02:00
tree.c rcu: Return early if callback is not specified 2025-07-10 16:03:17 +02:00
tree.h rcu/cpu_stall_cputime: fix the hardirq count for x86 architecture 2025-06-19 15:28:03 +02:00
update.c