[linux-yocto] [linux_yocto_v5.0/standard/preempt-rt/base][PATCH] genirq: Prevent use-after-free and work list corruption on rt
Hongxu Jia
hongxu.jia at windriver.com
Sat May 18 08:31:41 PDT 2019
Since commit [70a44a0 genirq: Prevent use-after-free and work list
corruption] applied, the patch makes it work on rt
Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
---
kernel/irq/manage.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index f72bd3a..143f87b 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -385,7 +385,11 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)
raw_spin_unlock_irqrestore(&desc->lock, flags);
if (old_notify) {
+#ifdef CONFIG_PREEMPT_RT_BASE
+ kthread_cancel_work_sync(&old_notify->work);
+#else
cancel_work_sync(&old_notify->work);
+#endif
kref_put(&old_notify->kref, old_notify->release);
}
--
2.8.1
More information about the linux-yocto
mailing list