ARM: 9424/1: vfp: Use vfp_state_hold() in vfp_sync_hwstate().
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 2 Oct 2024 16:16:33 +0000 (17:16 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 12 Nov 2024 16:41:47 +0000 (16:41 +0000)
commitb54cdbad4a39bb3abc85ac151f4882b3d92c5d79
tree694982cbbb63ba97da68b090dbc86f72a6399404
parentf26bdbe1fa9f79fa8cb0d0bf39303c3573c60552
ARM: 9424/1: vfp: Use vfp_state_hold() in vfp_sync_hwstate().

vfp_sync_hwstate() uses preempt_disable() followed by local_bh_disable()
to ensure that it won't get interrupted while checking the VFP state.
This harms PREEMPT_RT because softirq handling can get preempted and
local_bh_disable() synchronizes the related section with a sleeping lock
which does not work with disabled preemption.

Use the vfp_state_hold() to synchronize the access.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/vfp/vfpmodule.c