summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-07-17 21:41:35 +0200
committerSteven Rostedt <rostedt@goodmis.org>2021-07-02 18:43:13 -0400
commit6ae2597c9048865a02e2170767cbba1a6adbe2bf (patch)
treee8a3e31566eafc8fbfdd25f625205f9b2e42a8b5 /lib
parentcf3481d7b50770730dc69f4617d6582efe5fb74e (diff)
downloadlinux-rt-6ae2597c9048865a02e2170767cbba1a6adbe2bf.tar.gz
debugobjects: Make RT aware
Avoid filling the pool / allocating memory with irqs off(). Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/debugobjects.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index 9e14ae02306b..083882a3cf2f 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -557,7 +557,10 @@ __debug_object_init(void *addr, const struct debug_obj_descr *descr, int onstack
struct debug_obj *obj;
unsigned long flags;
- fill_pool();
+#ifdef CONFIG_PREEMPT_RT
+ if (preempt_count() == 0 && !irqs_disabled())
+#endif
+ fill_pool();
db = get_bucket((unsigned long) addr);