]> git.baikalelectronics.ru Git - kernel.git/commit
genirq: Dont allow affinity mask to be updated on IPIs
authorMatt Redfearn <matt.redfearn@imgtec.com>
Thu, 21 Apr 2016 09:08:32 +0000 (10:08 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 21 Apr 2016 10:05:15 +0000 (12:05 +0200)
commit8dea77771dc31aea517711ad2d2de265c95d977a
tree1160d87bfa592ecf06dc43425af4dec2f6f5977e
parent0b2ae9cd6e504d0f6c406655ebb9589e70455aa9
genirq: Dont allow affinity mask to be updated on IPIs

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: ec1744fee5ed ("genirq: Add a new generic IPI reservation code to irq core")
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: jason@lakedaemon.net
Cc: marc.zyngier@arm.com
Cc: ralf@linux-mips.org
Cc: Qais Yousef <qsyousef@gmail.com>
Cc: lisa.parratt@imgtec.com
Link: http://lkml.kernel.org/r/1461229712-13057-1-git-send-email-matt.redfearn@imgtec.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/irq/ipi.c