Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e76e482e authored by Arun Kumar Neelakantam's avatar Arun Kumar Neelakantam
Browse files

msm: smd: fix SMD probe initialization race condition



As an optimization, do_smd_probe() checks the free_offset and only
schedules the probe worker if the free_offset has changed (which
implies that new SMD channels may have been allocated).

If a remote subsystem allocates all of its SMD channels before SMSM
initialization has been completed, then when smsm_post_init() is
called, smsm_irq_handler() will call do_smd_probe() which will update
the free_offset and schedule the SMD probe worker. The probe worker
will bail because SMD has not been initialized yet (e.g. smd_initialized
isn't true). Once do_smd_probe() is called as part of smd_post_init(), it
compares the free_offset and doesn't see a change, so the SMD probe worker
is not scheduled.

Do not use do_smd_probe() until after SMD has been initialized.

CRs-Fixed: 538710
Change-Id: Ic4e97141202dfcb5f936a9cd38c6dcf9a61ccf8d
Signed-off-by: default avatarArun Kumar Neelakantam <aneela@codeaurora.org>
parent e6edf782
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment