Skip to content

Commit 55936f2

Browse files
KAGA-KOKOSebastian Andrzej Siewior
authored andcommitted
debugobjects: Make RT aware
Avoid filling the pool / allocating memory with irqs off(). Signed-off-by: Thomas Gleixner <[email protected]>
1 parent c313a83 commit 55936f2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/debugobjects.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,10 @@ __debug_object_init(void *addr, struct debug_obj_descr *descr, int onstack)
308308
struct debug_obj *obj;
309309
unsigned long flags;
310310

311-
fill_pool();
311+
#ifdef CONFIG_PREEMPT_RT_FULL
312+
if (preempt_count() == 0 && !irqs_disabled())
313+
#endif
314+
fill_pool();
312315

313316
db = get_bucket((unsigned long) addr);
314317

0 commit comments

Comments
 (0)