From efea8903218af963f77bba82a7263ca7840e0a34 Mon Sep 17 00:00:00 2001 From: Prasad Sodagudi Date: Mon, 29 Feb 2016 11:18:15 +0530 Subject: genirq: call cancel_work_sync from irq_set_affinity_notifier When ever notification of IRQ affinity changes, call cancel_work_sync from irq_set_affinity_notifier to cancel all pending works to avoid work list corruption. Change-Id: I1f093bcc43be8c6696bad29250e4926cbc6c4029 Signed-off-by: Prasad Sodagudi --- kernel/irq/manage.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'kernel/irq') diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 6ead200370da..5cb153a8474a 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -319,6 +319,9 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify) desc->affinity_notify = notify; raw_spin_unlock_irqrestore(&desc->lock, flags); + if (!notify && old_notify) + cancel_work_sync(&old_notify->work); + if (old_notify) kref_put(&old_notify->kref, old_notify->release); -- cgit v1.2.3