From: Matt Redfearn <matt.redfearn@imgtec.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: <lisa.parratt@imgtec.com>, <jason@lakedaemon.net>,
<ralf@linux-mips.org>, <linux-kernel@vger.kernel.org>,
<jiang.liu@linux.intel.com>, <marc.zyngier@arm.com>,
<linux-mips@linux-mips.org>, Qais Yousef <qsyousef@gmail.com>,
Matt Redfearn <matt.redfearn@imgtec.com>
Subject: [PATCH] genirq: Dont allow affinity mask to be updated on IPIs
Date: Thu, 21 Apr 2016 10:08:32 +0100 [thread overview]
Message-ID: <1461229712-13057-1-git-send-email-matt.redfearn@imgtec.com> (raw)
The IPI domain re-purposes the IRQ affinity to signify the mask of CPUs
that this IPI will deliver to. This must not be modified before the IPI
is destroyed again, so set the IRQ_NO_BALANCING flag to prevent the
affinity being overwritten by setup_affinity().
Without this, if an IPI is reserved for a single target CPU, then
allocated using __setup_irq(), the affinity is overwritten with
cpu_online_mask. When ipi_destroy() is subsequently called on a
multi-cpu system, it will attempt to free cpumask_weight() IRQs
that were never allocated, and crash.
Fixes: d17bf24e6952 ("genirq: Add a new generic IPI reservation code to
irq core")
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
---
kernel/irq/ipi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/irq/ipi.c b/kernel/irq/ipi.c
index c37f34b00a11..14777af8e097 100644
--- a/kernel/irq/ipi.c
+++ b/kernel/irq/ipi.c
@@ -94,6 +94,7 @@ unsigned int irq_reserve_ipi(struct irq_domain *domain,
data = irq_get_irq_data(virq + i);
cpumask_copy(data->common->affinity, dest);
data->common->ipi_offset = offset;
+ irq_set_status_flags(virq + i, IRQ_NO_BALANCING);
}
return virq;
--
2.5.0
next reply other threads:[~2016-04-21 9:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-21 9:08 Matt Redfearn [this message]
2016-04-21 10:09 ` [tip:irq/urgent] " tip-bot for Matt Redfearn
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=1461229712-13057-1-git-send-email-matt.redfearn@imgtec.com \
--to=matt.redfearn@imgtec.com \
--cc=jason@lakedaemon.net \
--cc=jiang.liu@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=lisa.parratt@imgtec.com \
--cc=marc.zyngier@arm.com \
--cc=qsyousef@gmail.com \
--cc=ralf@linux-mips.org \
--cc=tglx@linutronix.de \
/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®