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:
Arun Kumar Neelakantam <aneela@codeaurora.org>
Loading
Please register or sign in to comment