On Tue, Aug 3, 2021 at 9:26 PM Andy ShevchenkoI agree with you and David that my fix was not valid from the functional
<andy.shevchenko@xxxxxxxxx> wrote:
On Tue, Aug 3, 2021 at 9:21 PM Evgeny Novikov <novikov@xxxxxxxxx> wrote:Hold on, but then it follows with another loop where actually it reads
It looks like pmc_core_get_low_power_modes() mixes up modes andSeems legit.
priorities. In addition to invalid behavior, potentially this can
cause buffer overflows since the driver reads priorities from the
register and then it uses them as indexes for array lpm_priority
that can contain 8 elements at most. The patch swaps modes and
priorities.
Found by Linux Driver Verification project (linuxtesting.org).
modes by priority index. Can you elaborate what exactly is the problem
you think?