diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2019-11-15 09:28:29 -0500 |
---|---|---|
committer | Luis Claudio R. Goncalves <lgoncalv@redhat.com> | 2021-10-11 07:51:28 -0300 |
commit | 9a17f9607163fda1c36fc529e7368660fbe8c43d (patch) | |
tree | c8cc4819f99c0dec2dc836d554c3e997ee42d19d | |
parent | 8d5e10dbc596877276e13650f3e8bf191ac63d30 (diff) | |
download | linux-rt-9a17f9607163fda1c36fc529e7368660fbe8c43d.tar.gz |
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>
-rw-r--r-- | kernel/irq/manage.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 0d627e2c4cc0..f18b89016e5f 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); } |