diff options
author | Mark Rutland <mark.rutland@arm.com> | 2025-04-09 17:40:10 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2025-04-09 18:06:31 +0100 |
commit | 2fe2b96c3818a043eb013a9db1885de75987715d (patch) | |
tree | 292879052acbc48ff2cf32b6d4ab6f7ef611f887 /scripts/lib/kdoc/kdoc_files.py | |
parent | 929fa99b1215966fc8a6ccc2e14b92e36c3c42f3 (diff) |
arm64/fpsimd: signal: Simplify preserve_tpidr2_context()
During a context-switch, tls_thread_switch() reads and writes a task's
thread_struct::tpidr2_el0 field. Other code shouldn't access this field
for an active task, as such accesses would form a data-race with a
concurrent context-switch.
The usage in preserve_tpidr2_context() is suspicious, but benign as any
race with a context switch will write the same value back to
current->thread.tpidr2_el0.
Make this clearer and match restore_tpidr2_context() by using a
temporary variable instead, avoiding the (benign) data-race.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20250409164010.3480271-14-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions