Linux-rt-users archive on
 help / color / Atom feed
* [RT PATCH] kernel/irq: make irq_set_affinity_notifier() work on old_notify consistently
@ 2019-08-22  6:51 Juri Lelli
  0 siblings, 0 replies; only message in thread
From: Juri Lelli @ 2019-08-22  6:51 UTC (permalink / raw)
  To: tglx, bigeasy, rostedt; +Cc: linux-rt-users, linux-kernel, williams, Juri Lelli

The second half of irq_set_affinity_notifier() flushes an old notifier,
but (for RT) it is currently working on 'notify', which is the new one
(or can be NULL - in fact a NULL pointer dereference has been observed).

Fix this by making the second half of irq_set_affinity_notifier() use
old_notify consistently.

Fixes: d4200ab75cdd ("genirq: Handle missing work_struct in irq_set_affinity_notifier()")
Signed-off-by: Juri Lelli <>

This applies to v4.19.59-rt24 (and to all the other branches that have
the patch that introduced the issue). v5.2-rtx doesn't have this problem
(thanks to the workqueue rework).


 kernel/irq/manage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index b2736d7d863b..4586967a1b32 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -386,7 +386,7 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)
 	if (old_notify) {
-		kthread_cancel_work_sync(&notify->work);
+		kthread_cancel_work_sync(&old_notify->work);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-22  6:51 [RT PATCH] kernel/irq: make irq_set_affinity_notifier() work on old_notify consistently Juri Lelli

Linux-rt-users archive on

Archives are clonable:
	git clone --mirror linux-rt-users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rt-users linux-rt-users/ \
	public-inbox-index linux-rt-users

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox