Arvind M | 10268e7 | 2017-12-04 22:18:06 -0800 | [diff] [blame^] | 1 | From 72f321da37c7471de569b19c68fa90019d36a074 Mon Sep 17 00:00:00 2001 |
Allen Martin | 685e0f8 | 2016-07-26 19:34:29 -0700 | [diff] [blame] | 2 | From: Thomas Gleixner <tglx@linutronix.de> |
| 3 | Date: Sun, 17 Jul 2011 21:41:35 +0200 |
Arvind M | 10268e7 | 2017-12-04 22:18:06 -0800 | [diff] [blame^] | 4 | Subject: [PATCH 176/366] debugobjects: Make RT aware |
Allen Martin | 685e0f8 | 2016-07-26 19:34:29 -0700 | [diff] [blame] | 5 | |
| 6 | Avoid filling the pool / allocating memory with irqs off(). |
| 7 | |
| 8 | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> |
Allen Martin | 685e0f8 | 2016-07-26 19:34:29 -0700 | [diff] [blame] | 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 |
Ishan Mittal | b799826 | 2017-01-17 16:11:50 +0530 | [diff] [blame] | 14 | index 547f7f9..8fcdbc2 100644 |
Allen Martin | 685e0f8 | 2016-07-26 19:34:29 -0700 | [diff] [blame] | 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 | -- |
Arvind M | 10268e7 | 2017-12-04 22:18:06 -0800 | [diff] [blame^] | 30 | 1.9.1 |
Allen Martin | 685e0f8 | 2016-07-26 19:34:29 -0700 | [diff] [blame] | 31 | |