[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190719214956.460034332@goodmis.org>
Date: Fri, 19 Jul 2019 17:49:34 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org,
linux-rt-users <linux-rt-users@...r.kernel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Carsten Emde <C.Emde@...dl.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
John Kacur <jkacur@...hat.com>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
Julia Cartwright <julia@...com>,
Daniel Wagner <wagi@...om.org>, tom.zanussi@...ux.intel.com
Subject: [PATCH RT 03/16] genirq: Handle missing work_struct in irq_set_affinity_notifier()
4.19.59-rt24-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
[ Upstream commit bbc4d2a7d6ff54ba923640d9a42c7bef7185fe98 ]
The backported stable commit
59c39840f5abf ("genirq: Prevent use-after-free and work list corruption")
added cancel_work_sync() on a work_struct element which is not available
in RT.
Replace cancel_work_sync() with kthread_cancel_work_sync() on RT.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
---
kernel/irq/manage.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 381305c48a0a..b2736d7d863b 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -385,8 +385,9 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)
raw_spin_unlock_irqrestore(&desc->lock, flags);
if (old_notify) {
-#ifndef CONFIG_PREEMPT_RT_BASE
- /* Need to address this for PREEMPT_RT */
+#ifdef CONFIG_PREEMPT_RT_BASE
+ kthread_cancel_work_sync(¬ify->work);
+#else
cancel_work_sync(&old_notify->work);
#endif
kref_put(&old_notify->kref, old_notify->release);
--
2.20.1
Powered by blists - more mailing lists