Page MenuHomePhabricator

get psci states without check in fuinc ‘’psci_do_state_coordination‘’
Closed, ResolvedPublic

Description

In function 'psci_do_state_coordination', the req_states returns from ‘psci_get_req_local_pwr_states‘,and will be 'NULL' when pwrlvl is not valid. 'plat_get_target_pwr_state' uses req_states without any check will lead to unexpected result.

thanks a lot.

Event Timeline

yuezhiran created this task.Dec 9 2021, 1:55 PM

Hi
As you mentioned, req_states will be NULL only if pwrlvl is not valid. However, in my opinion, many checks have been done earlier to the invocation of the function to make sure pwrlvl is valid. See lines 246 and 428 in lib/psci/psci_common.c file. Can you tell if you have noticed any issue in your platform with PSCI library?

Ok, thanks a lot.

yuezhiran closed this task as Resolved.Mar 21 2022, 9:50 AM