aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-08-30 14:06:31 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-08-30 14:06:31 -0700
commite4c3562e1bc79f912457cb062cd0c147026d4a1e (patch)
tree2ac95b21da976c994ff723b876c6deab2a621cee /lib
parentMerge tag 'efi-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (diff)
parentdebugobjects: Make them PREEMPT_RT aware (diff)
downloadwireguard-linux-e4c3562e1bc79f912457cb062cd0c147026d4a1e.tar.xz
wireguard-linux-e4c3562e1bc79f912457cb062cd0c147026d4a1e.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/debugobjects.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index 9e14ae02306b..6946f8e204e3 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -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);