soc: qcom: pmic_glink: Fix a race condition in accessing rx_list
Currently, rx_list is updated from pmic_glink_rpmsg_callback() with the new message received and the workqueue is queued for pmic_glink_rx_work() to deliver it to the client. However, there is a possibility that a race condition can occur when this list is manipulated from pmic_glink_rpmsg_callback() in interrupt context and pmic_glink_rx_work() from process context. Fix it by using rx_lock before using list_* in pmic_glink_rx_work(). Change-Id: Ib10671d89d60e4b33f1a9666f4af08bb09d1a53b Suggested-by:Chris Lew <clew@codeaurora.org> Suggested-by:
David Collins <collinsd@codeaurora.org> Signed-off-by:
Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Loading
Please register or sign in to comment