blob: f4e3f5b76b8db8780af4886e7f12d6fd953e3701 [file] [log] [blame]
Allen Martin685e0f82016-07-26 19:34:29 -07001From 3e1a0dabde58e814d74a2d495cd189e16fecfd41 Mon Sep 17 00:00:00 2001
2From: Thomas Gleixner <tglx@linutronix.de>
3Date: Sun, 17 Jul 2011 21:41:35 +0200
4Subject: [PATCH 226/317] debugobjects: Make RT aware
5X-NVConfidentiality: public
6
7Avoid filling the pool / allocating memory with irqs off().
8
9Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
10Signed-off-by: Allen Martin <amartin@nvidia.com>
11---
12 lib/debugobjects.c | 5 ++++-
13 1 file changed, 4 insertions(+), 1 deletion(-)
14
15diff --git a/lib/debugobjects.c b/lib/debugobjects.c
16index 547f7f923dbc..8fcdbc2fc6d0 100644
17--- a/lib/debugobjects.c
18+++ b/lib/debugobjects.c
19@@ -309,7 +309,10 @@ __debug_object_init(void *addr, struct debug_obj_descr *descr, int onstack)
20 struct debug_obj *obj;
21 unsigned long flags;
22
23- fill_pool();
24+#ifdef CONFIG_PREEMPT_RT_FULL
25+ if (preempt_count() == 0 && !irqs_disabled())
26+#endif
27+ fill_pool();
28
29 db = get_bucket((unsigned long) addr);
30
31--
322.9.3
33