mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-29 21:33:00 +01:00
debugobjects: Make them PREEMPT_RT aware
On PREEMPT_RT enabled kernels it is not possible to refill the object pool from atomic context (preemption or interrupts disabled) as the allocator might acquire 'sleeping' spinlocks. Guard the invocation of fill_pool() accordingly. Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Sebastian Andrzej Siewior <[email protected]> Link: https://lore.kernel.org/r/87sfzehdnl.ffs@tglx
This commit is contained in:
1 parent
36a21d5172
commit
4bedcc2846
1 file changed
+6
-1
+6
-1
@@ -557,7 +557,12 @@ __debug_object_init(void *addr, const struct debug_obj_descr *descr, int onstack
|
||||
struct debug_obj *obj;
|
||||
unsigned long flags;
|
||||
|
||||
fill_pool();
|
||||
/*
|
||||
* On RT enabled kernels the pool refill must happen in preemptible
|
||||
* context:
|
||||
*/
|
||||
if (!IS_ENABLED(CONFIG_PREEMPT_RT) || preemptible())
|
||||
fill_pool();
|
||||
|
||||
db = get_bucket((unsigned long) addr);
|
||||
|
||||
|
||||
Reference in new issue
Block a user