[dpdk-dev] [PATCH v3 1/1] power: check freq count before filling the freqs array

David Hunt david.hunt at intel.com
Fri Jul 23 10:37:56 CEST 2021


Hi Richael,

On 23/7/2021 3:22 AM, Richael Zhuang wrote:
> The freqs array size is RTE_MAX_LCORE_FREQS. Before filling the
> array with num_freqs elements, restrict the total num to
> RTE_MAX_LCORE_FREQS. This fix aims to fix the coverity scan issue
> like:
> Overrunning array "pi->freqs" of 256 bytes by passing it to a
> function which accesses it at byte offset 464.
>
> Coverity issue: 371913
> Fixes: ef1cc88f1837 ("power: support cppc_cpufreq driver")
> Cc: richael.zhuang at arm.com
> Cc: stable at dpdk.org
>
> Signed-off-by: Richael Zhuang <richael.zhuang at arm.com>
> ---
>   lib/power/power_cppc_cpufreq.c   | 5 +++++
>   lib/power/power_pstate_cpufreq.c | 5 +++++
>   2 files changed, 10 insertions(+)
>
---snip---

LGTM to fix the coverity issue.

Acked-by: David Hunt <david.hunt at intel.com>




More information about the dev mailing list