Commit 294b3a6
rcu: Return early if callback is not specified
[ Upstream commit 33b6a1f ]
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>1 parent 93147ab commit 294b3a6
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3068 | 3068 | | |
3069 | 3069 | | |
3070 | 3070 | | |
| 3071 | + | |
| 3072 | + | |
| 3073 | + | |
| 3074 | + | |
3071 | 3075 | | |
3072 | 3076 | | |
3073 | 3077 | | |
| |||
0 commit comments