summaryrefslogtreecommitdiffstats
path: root/drivers/reset
diff options
context:
space:
mode:
authorRishabh Bhatnagar <rishabhb@codeaurora.org>2021-08-04 14:19:59 -0700
committerSudeep Holla <sudeep.holla@arm.com>2021-08-05 11:57:03 +0100
commit1e7cbfaa66d39e78bd24df0c78b55df68176b59e (patch)
tree760d00920288bfcdd66c202db8e8502f9bcadd09 /drivers/reset
parent46abe13b5e3db187e52cd0de06c07bbce010726c (diff)
downloadlinux-1e7cbfaa66d39e78bd24df0c78b55df68176b59e.tar.bz2
firmware: arm_scmi: Free mailbox channels if probe fails
Mailbox channels for the base protocol are setup during probe. There can be a scenario where probe fails to acquire the base protocol due to a timeout leading to cleaning up of all device managed memory including the scmi_mailbox structure setup during mailbox_chan_setup function. | arm-scmi soc:qcom,scmi: timed out in resp(caller: version_get+0x84/0x140) | arm-scmi soc:qcom,scmi: unable to communicate with SCMI | arm-scmi: probe of soc:qcom,scmi failed with error -110 Now when a message arrives at cpu slightly after the timeout, the mailbox controller will try to call the rx_callback of the client and might end up accessing freed memory. | rx_callback+0x24/0x160 | mbox_chan_received_data+0x44/0x94 | __handle_irq_event_percpu+0xd4/0x240 This patch frees the mailbox channels setup during probe and adds some more error handling in case the probe fails. Link: https://lore.kernel.org/r/1628111999-21595-1-git-send-email-rishabhb@codeaurora.org Tested-by: Cristian Marussi <cristian.marussi@arm.com> Reviewed-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/reset')
0 files changed, 0 insertions, 0 deletions