summaryrefslogtreecommitdiffstats
path: root/kernel/rcu/rcu.h
diff options
context:
space:
mode:
authorStephen Boyd <swboyd@chromium.org>2020-08-14 17:40:27 -0700
committerThomas Gleixner <tglx@linutronix.de>2020-09-24 21:56:25 +0200
commitf9e62f318fd706a54b7ce9b28e5c7e49bbde8788 (patch)
tree6c94a6e2e3fae032ac087c0a5857fe3c81cc295d /kernel/rcu/rcu.h
parentaedcade6f4fa9a1e65f327fc42de3fb47660646c (diff)
downloadlinux-f9e62f318fd706a54b7ce9b28e5c7e49bbde8788.tar.gz
linux-f9e62f318fd706a54b7ce9b28e5c7e49bbde8788.tar.bz2
linux-f9e62f318fd706a54b7ce9b28e5c7e49bbde8788.zip
treewide: Make all debug_obj_descriptors const
This should make it harder for the kernel to corrupt the debug object descriptor, used to call functions to fixup state and track debug objects, by moving the structure to read-only memory. Signed-off-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20200815004027.2046113-3-swboyd@chromium.org
Diffstat (limited to 'kernel/rcu/rcu.h')
-rw-r--r--kernel/rcu/rcu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h
index cf66a3ccd757..e01cba5e4b52 100644
--- a/kernel/rcu/rcu.h
+++ b/kernel/rcu/rcu.h
@@ -167,7 +167,7 @@ static inline unsigned long rcu_seq_diff(unsigned long new, unsigned long old)
# define STATE_RCU_HEAD_READY 0
# define STATE_RCU_HEAD_QUEUED 1
-extern struct debug_obj_descr rcuhead_debug_descr;
+extern const struct debug_obj_descr rcuhead_debug_descr;
static inline int debug_rcu_head_queue(struct rcu_head *head)
{