39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
|
From 7b5a6716bdd2256d8f17a62fce721e377437e449 Mon Sep 17 00:00:00 2001
|
||
|
From: Steven Rostedt <rostedt@goodmis.org>
|
||
|
Date: Fri, 15 Nov 2019 09:28:29 -0500
|
||
|
Subject: [PATCH 364/365] genirq: Do not call cancel_work on old_notify->work
|
||
|
on PREEMPT_RT
|
||
|
|
||
|
When PREEMPT_RT is configured, old_notify->work does not exist, and
|
||
|
instead swork is used. Unfortunately, there is no cancel_work() for
|
||
|
swork. This is a known bug, and 4.4 will just need to deal with it
|
||
|
as the real solution to this is to backport all the work queue code
|
||
|
from RT mainline.
|
||
|
|
||
|
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
||
|
---
|
||
|
kernel/irq/manage.c | 7 +++----
|
||
|
1 file changed, 3 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
|
||
|
index 5a217c230dee..2fc96cb4eb28 100644
|
||
|
--- a/kernel/irq/manage.c
|
||
|
+++ b/kernel/irq/manage.c
|
||
|
@@ -372,10 +372,9 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)
|
||
|
raw_spin_unlock_irqrestore(&desc->lock, flags);
|
||
|
|
||
|
if (old_notify) {
|
||
|
- if (cancel_work_sync(&old_notify->work)) {
|
||
|
- /* Pending work had a ref, put that one too */
|
||
|
- kref_put(&old_notify->kref, old_notify->release);
|
||
|
- }
|
||
|
+#ifndef CONFIG_PREEMPT_RT_BASE
|
||
|
+ cancel_work_sync(&old_notify->work);
|
||
|
+#endif
|
||
|
kref_put(&old_notify->kref, old_notify->release);
|
||
|
}
|
||
|
|
||
|
--
|
||
|
2.28.0
|
||
|
|