mailbox: pcc: Reset pcc_chan_count to zero in case of PCC probe failure
mainline inclusion from mainline-v6.2-rc1 commit 6d7d3c28 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6Z91B CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.3-rc2&id=6d7d3c287410c0ad499e478e2338dc3d7e3392b1 -------------------------------- Currently, 'pcc_chan_count' is remains set to a non-zero value if PCC subspaces are parsed successfully but something else fail later during the initial PCC probing phase. This will result in pcc_mbox_request_channel trying to access the resources that are not initialised or allocated and may end up in a system crash. Reset pcc_chan_count to 0 when the PCC probe fails in order to prevent the possible issue as described above. Fixes: ce028702 ("mailbox: pcc: Move bulk of PCCT parsing into pcc_mbox_probe") Signed-off-by:Huisong Li <lihuisong@huawei.com> Reviewed-by:
Sudeep Holla <sudeep.holla@arm.com>
Loading
Please sign in to comment