Commit 8e6d59ca authored by Marc Zyngier's avatar Marc Zyngier Committed by Zheng Zengkai
Browse files

clocksource/drivers/arm_arch_timer: Fix MMIO base address vs callback ordering issue

mainline inclusion
from mainline-v5.16-rc1
commit 72f47a3f
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4QCBG


CVE: NA

----------------------

The MMIO timer base address gets published after we have registered
the callbacks and the interrupt handler, which is... a bit dangerous.

Fix this by moving the base address publication to the point where
we register the timer, and expose a pointer to the timer structure
itself rather than a naked value.

Reviewed-by: default avatarOliver Upton <oupton@google.com>
Reviewed-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211017124225.3018098-7-maz@kernel.org


Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>

 Conflicts:
	drivers/clocksource/arm_arch_timer.c
[fix conflicts caused by extra '__ro_after_init']
Signed-off-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: default avatarHanjun Guo <guohanjun@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 0c5e41ca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment