mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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
This commit is contained in:
committed by
Thomas Gleixner
parent
aedcade6f4
commit
f9e62f318f
@@ -427,7 +427,7 @@ static void show_pwq(struct pool_workqueue *pwq);
|
||||
|
||||
#ifdef CONFIG_DEBUG_OBJECTS_WORK
|
||||
|
||||
static struct debug_obj_descr work_debug_descr;
|
||||
static const struct debug_obj_descr work_debug_descr;
|
||||
|
||||
static void *work_debug_hint(void *addr)
|
||||
{
|
||||
@@ -477,7 +477,7 @@ static bool work_fixup_free(void *addr, enum debug_obj_state state)
|
||||
}
|
||||
}
|
||||
|
||||
static struct debug_obj_descr work_debug_descr = {
|
||||
static const struct debug_obj_descr work_debug_descr = {
|
||||
.name = "work_struct",
|
||||
.debug_hint = work_debug_hint,
|
||||
.is_static_object = work_is_static_object,
|
||||
|
Reference in New Issue
Block a user