From: Avi Weiss <thnkslprpt@gmail.com>
To: tglx@kernel.org
Cc: radu@rendec.net, maz@kernel.org, linux-kernel@vger.kernel.org,
Avi Weiss <thnkslprpt@gmail.com>
Subject: [PATCH] genirq/core: Free per-CPU enabled mask when releasing an IRQ descriptor
Date: Sun, 1 Nov 2026 06:53:55 +0200 [thread overview]
Message-ID: <20261101045354.60854-2-thnkslprpt@gmail.com> (raw)
irq_set_percpu_devid() allocates desc->percpu_enabled separately from
the descriptor's affinity masks. irq_kobj_release() frees the other
descriptor allocations but leaves this mask allocated when a sparse
IRQ descriptor is destroyed.
Free desc->percpu_enabled during descriptor release.
Fixes: 31d9d9b6d830 ("genirq: Add support for per-cpu dev_id interrupts")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
Validation: Source-extracted ASan/LSan harness.
Baseline leak reproduced; patched test and controls passed.
Kernel object compilation not performed (no verified .config).
kernel/irq/irqdesc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 7cbcc3fb9e6d..ee8b4646372e 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -461,6 +461,7 @@ static void irq_kobj_release(struct kobject *kobj)
free_masks(desc);
free_percpu(desc->kstat_irqs);
+ kfree(desc->percpu_enabled);
kfree(desc);
}
--
2.43.0
reply other threads:[~2026-11-01 4:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261101045354.60854-2-thnkslprpt@gmail.com \
--to=thnkslprpt@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=radu@rendec.net \
--cc=tglx@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®