kernel/lib/debugobjects.c
.. .. @@ -376,7 +376,10 @@ 376 376 struct debug_obj *obj; 377 377 unsigned long flags; 378 378 379 - fill_pool();379 +#ifdef CONFIG_PREEMPT_RT_FULL380 + if (preempt_count() == 0 && !irqs_disabled())381 +#endif382 + fill_pool();380 383 381 384 db = get_bucket((unsigned long) addr); 382 385