]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/blob - rt-patches/0176-debugobjects-Make-RT-aware.patch
Fix memguard and related syscalls
[hercules2020/nv-tegra/linux-4.4.git] / rt-patches / 0176-debugobjects-Make-RT-aware.patch
1 From 72f321da37c7471de569b19c68fa90019d36a074 Mon Sep 17 00:00:00 2001
2 From: Thomas Gleixner <tglx@linutronix.de>
3 Date: Sun, 17 Jul 2011 21:41:35 +0200
4 Subject: [PATCH 176/366] debugobjects: Make RT aware
5
6 Avoid filling the pool / allocating memory with irqs off().
7
8 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
9 ---
10  lib/debugobjects.c | 5 ++++-
11  1 file changed, 4 insertions(+), 1 deletion(-)
12
13 diff --git a/lib/debugobjects.c b/lib/debugobjects.c
14 index 547f7f9..8fcdbc2 100644
15 --- a/lib/debugobjects.c
16 +++ b/lib/debugobjects.c
17 @@ -309,7 +309,10 @@ __debug_object_init(void *addr, struct debug_obj_descr *descr, int onstack)
18         struct debug_obj *obj;
19         unsigned long flags;
20  
21 -       fill_pool();
22 +#ifdef CONFIG_PREEMPT_RT_FULL
23 +       if (preempt_count() == 0 && !irqs_disabled())
24 +#endif
25 +               fill_pool();
26  
27         db = get_bucket((unsigned long) addr);
28  
29 -- 
30 1.9.1
31