[GIT pull] core/debugobjects for v5.15-rc1

From: Thomas Gleixner
Date: Mon Aug 30 2021 - 06:44:45 EST


Linus,

please pull the latest core/debugobjects branch from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-debugobjects-2021-08-30

up to: 4bedcc28469a: debugobjects: Make them PREEMPT_RT aware


A single commit for debugobjects to make them work on PREEMPT_RT by
preventing object pool refill in atomic contexts.


Thanks,

tglx

------------------>
Thomas Gleixner (1):
debugobjects: Make them PREEMPT_RT aware


lib/debugobjects.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index 9e14ae02306b..6946f8e204e3 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -557,7 +557,12 @@ __debug_object_init(void *addr, const struct debug_obj_descr *descr, int onstack
struct debug_obj *obj;
unsigned long flags;

- fill_pool();
+ /*
+ * On RT enabled kernels the pool refill must happen in preemptible
+ * context:
+ */
+ if (!IS_ENABLED(CONFIG_PREEMPT_RT) || preemptible())
+ fill_pool();

db = get_bucket((unsigned long) addr);