Skip to content

Commit e4c3562

Browse files
committed
Merge tag 'core-debugobjects-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull debugobjects update from Thomas Gleixner: "A single commit for debugobjects to make them work on PREEMPT_RT by preventing object pool refill in atomic contexts" * tag 'core-debugobjects-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Make them PREEMPT_RT aware
2 parents 46f4945 + 4bedcc2 commit e4c3562

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/debugobjects.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,12 @@ __debug_object_init(void *addr, const struct debug_obj_descr *descr, int onstack
557557
struct debug_obj *obj;
558558
unsigned long flags;
559559

560-
fill_pool();
560+
/*
561+
* On RT enabled kernels the pool refill must happen in preemptible
562+
* context:
563+
*/
564+
if (!IS_ENABLED(CONFIG_PREEMPT_RT) || preemptible())
565+
fill_pool();
561566

562567
db = get_bucket((unsigned long) addr);
563568

0 commit comments

Comments
 (0)