blob: a07f06a1c0a72df7d179fd82d794584c213b577e [file] [log] [blame]
Arvind M10268e72017-12-04 22:18:06 -08001From 72f321da37c7471de569b19c68fa90019d36a074 Mon Sep 17 00:00:00 2001
Allen Martin685e0f82016-07-26 19:34:29 -07002From: Thomas Gleixner <tglx@linutronix.de>
3Date: Sun, 17 Jul 2011 21:41:35 +0200
Arvind M10268e72017-12-04 22:18:06 -08004Subject: [PATCH 176/366] debugobjects: Make RT aware
Allen Martin685e0f82016-07-26 19:34:29 -07005
6Avoid filling the pool / allocating memory with irqs off().
7
8Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Allen Martin685e0f82016-07-26 19:34:29 -07009---
10 lib/debugobjects.c | 5 ++++-
11 1 file changed, 4 insertions(+), 1 deletion(-)
12
13diff --git a/lib/debugobjects.c b/lib/debugobjects.c
Ishan Mittalb7998262017-01-17 16:11:50 +053014index 547f7f9..8fcdbc2 100644
Allen Martin685e0f82016-07-26 19:34:29 -070015--- a/lib/debugobjects.c
16+++ b/lib/debugobjects.c
17@@ -309,7 +309,10 @@ __debug_object_init(void *addr, struct debug_obj_descr *descr, int onstack)
18 struct debug_obj *obj;
19 unsigned long flags;
20
21- fill_pool();
22+#ifdef CONFIG_PREEMPT_RT_FULL
23+ if (preempt_count() == 0 && !irqs_disabled())
24+#endif
25+ fill_pool();
26
27 db = get_bucket((unsigned long) addr);
28
29--
Arvind M10268e72017-12-04 22:18:06 -0800301.9.1
Allen Martin685e0f82016-07-26 19:34:29 -070031