diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-06-30 14:12:05 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-09-04 16:55:51 +0200 |
commit | 4e06c33aaa5ddcec2c01fed66082053153b19ebd (patch) | |
tree | f21a6474518151fdb57dbd49394c45c170585895 /lib/cpu-notifier-error-inject.c | |
parent | bcd14791ba62d2eaf85b27dc90ca71a96753639b (diff) |
firmware: qcom: scm: request the waitqueue irq *after* initializing SCM
commit 7ab36b51c6bee56e1a1939063dd10d602fe49d13 upstream.
There's a subtle race in the SCM driver: we assign the __scm pointer
before requesting the waitqueue interrupt. Assigning __scm marks the SCM
API as ready to accept calls. It's possible that a user makes a call
right after we set __scm and the firmware raises an interrupt before the
driver's ready to service it. Move the __scm assignment after we request
the interrupt.
This has the added benefit of allowing us to drop the goto label.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20250630-qcom-scm-race-v2-4-fa3851c98611@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/cpu-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions