Skip to contentSkip to conversation

genirq: replace notify with old_notify in irq_set_affinity_notifier()

PATCH In review Ivan Safonov 2 participants 2 messages Sep 28, 2019 IRQ

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 genirq: replace notify with old_notify in irq_set_affinity_notifier()

This patch is for Linux 4.19 with a RT patch.

The second 'if' block does not check notify for NULL, this leads to a system crash.

Most likely, there is a typo here.

With old_notify system works as expected.

---
 kernel/irq/manage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/manage.c +1 -1
index 290cd520dba1..79a7072dfb3c 100644
@@ -412,7 +412,7 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)
 
 	if (old_notify) {
 #ifdef CONFIG_PREEMPT_RT_BASE
-		kthread_cancel_work_sync(&notify->work);
+		kthread_cancel_work_sync(&old_notify->work);
 #else
 		cancel_work_sync(&old_notify->work);
 #endif
Signature · 1 line
2.21.0
#1 lore raw
Quoted 19 lines · On Sat, 28 Sep 2019 18:19:20 +0300 Ivan Safonov <[email protected]> wrote:

This patch is for Linux 4.19 with a RT patch.

The second 'if' block does not check notify for NULL, this leads to a system crash.

Most likely, there is a typo here.

With old_notify system works as expected.

---
 kernel/irq/manage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/manage.c +0 -0
index 290cd520dba1..79a7072dfb3c 100644

kernel/irq/manage.c irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify) · line 415

Quoted 5 lines
kernel/irq/manage.c +1 -1
@@ -412,7 +412,7 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)
 
 	if (old_notify) {
 #ifdef CONFIG_PREEMPT_RT_BASE
-		kthread_cancel_work_sync(&notify->work);
+		kthread_cancel_work_sync(&old_notify->work);

Thanks for the patch, but I currently have an RFC out that rewrites all this code. I'm hoping to apply the RFC patch next week.

-- Steve

Quoted 3 lines
kernel/irq/manage.c +0 -0
 #else
 		cancel_work_sync(&old_notify->work);
 #endif