From 102a0743326a03cd1a1202ceda21e175b7d3575c Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Tue, 20 Feb 2024 01:20:52 +0000 Subject: [PATCH] add new system file --- kernel/lib/cpu_rmap.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/kernel/lib/cpu_rmap.c b/kernel/lib/cpu_rmap.c index f08d9c5..1833ad7 100644 --- a/kernel/lib/cpu_rmap.c +++ b/kernel/lib/cpu_rmap.c @@ -232,7 +232,8 @@ for (index = 0; index < rmap->used; index++) { glue = rmap->obj[index]; - irq_set_affinity_notifier(glue->notify.irq, NULL); + if (glue) + irq_set_affinity_notifier(glue->notify.irq, NULL); } cpu_rmap_put(rmap); @@ -267,6 +268,7 @@ struct irq_glue *glue = container_of(ref, struct irq_glue, notify.kref); + glue->rmap->obj[glue->index] = NULL; cpu_rmap_put(glue->rmap); kfree(glue); } @@ -297,6 +299,7 @@ rc = irq_set_affinity_notifier(irq, &glue->notify); if (rc) { cpu_rmap_put(glue->rmap); + rmap->obj[glue->index] = NULL; kfree(glue); } return rc; -- Gitblit v1.6.2