alistair23-linux/drivers/bus
Marc Zyngier b18c2b9487 bus: arm-ccn: Fix use of smp_processor_id() in preemptible context
Booting a DEBUG_PREEMPT enabled kernel on a CCN-based system
results in the following splat:

[...]
arm-ccn e8000000.ccn: No access to interrupts, using timer.
BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1
caller is debug_smp_processor_id+0x1c/0x28
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.13.0 #6111
Hardware name: AMD Seattle/Seattle, BIOS 17:08:23 Jun 26 2017
Call trace:
[<ffff000008089e78>] dump_backtrace+0x0/0x278
[<ffff00000808a22c>] show_stack+0x24/0x30
[<ffff000008bc3bc4>] dump_stack+0x8c/0xb0
[<ffff00000852b534>] check_preemption_disabled+0xfc/0x100
[<ffff00000852b554>] debug_smp_processor_id+0x1c/0x28
[<ffff000008551bd8>] arm_ccn_probe+0x358/0x4f0
[...]

as we use smp_processor_id() in the wrong context.

Turn this into a get_cpu()/put_cpu() that extends over the CPU hotplug
registration, making sure that we don't race against a CPU down operation.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: stable@vger.kernel.org # 4.2+
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
2017-12-04 16:53:26 +00:00
..
arm-cci.c bus: Convert to using %pOF instead of full_name 2017-08-16 17:21:40 +02:00
arm-ccn.c bus: arm-ccn: Fix use of smp_processor_id() in preemptible context 2017-12-04 16:53:26 +00:00
brcmstb_gisb.c bus: brcmstb_gisb: update to support new revision 2017-05-13 20:18:57 -07:00
da8xx-mstpri.c bus: da850-mstpri: fix my e-mail address 2017-01-02 15:52:32 +05:30
imx-weim.c bus: Convert to using %pOF instead of full_name 2017-08-16 17:21:40 +02:00
Kconfig ARM: SoC driver updates for v4.15 2017-11-16 16:05:01 -08:00
Makefile ARM: SoC driver updates for v4.15 2017-11-16 16:05:01 -08:00
mips_cdmm.c MIPS/BUS/CDMM: Convert to hotplug state machine 2016-09-06 18:30:25 +02:00
mvebu-mbus.c bus: mbus: fix window size calculation for 4GB windows 2017-10-12 15:01:30 +02:00
omap-ocp2scp.c bus: omap-ocp2scp: Fix error handling in omap_ocp2scp_probe 2017-07-12 02:25:41 -07:00
omap_l3_noc.c
omap_l3_noc.h
omap_l3_smx.c
omap_l3_smx.h
qcom-ebi2.c bus: qcom: add EBI2 driver 2016-09-08 15:27:05 +02:00
simple-pm-bus.c
sunxi-rsb.c bus: Convert to using %pOF instead of full_name 2017-08-16 17:21:40 +02:00
tegra-aconnect.c bus: tegra-aconnect: Use of_pm_clk_add_clk() 2016-08-16 12:22:51 +02:00
tegra-gmi.c bus: Add support for Tegra Generic Memory Interface 2016-11-15 17:27:53 +01:00
ti-sysc.c bus: ti-sysc: Fix unbalanced pm_runtime_enable by adding remove 2017-10-13 10:48:40 -07:00
ts-nbus.c bus: add driver for the Technologic Systems NBUS 2017-11-07 16:28:19 +01:00
uniphier-system-bus.c bus: uniphier-system-bus: set up registers when resuming 2017-08-04 12:57:18 +02:00
vexpress-config.c bus: vexpress-config: fix device reference leak 2016-11-30 23:29:37 +01:00