Re: [PATCH v2 2/4] spi: cadence-qspi: fix pointer reference in runtime PM hooks

From: Mark Brown
Date: Mon Feb 05 2024 - 10:12:29 EST


On Mon, Feb 05, 2024 at 03:57:30PM +0100, Théo Lebrun wrote:
> dev_get_drvdata() gets used to acquire the pointer to cqspi and the SPI
> controller. Neither embed the other; this lead to memory corruption.
>
> On a given platform (Mobileye EyeQ5) the memory corruption is hidden
> inside cqspi->f_pdata. Also, this uninitialised memory is used as a
> mutex (ctlr->bus_lock_mutex) by spi_controller_suspend().

Please place fixes at the start of serieses so that they don't end up
with spurious dependencies on other changes and can more easily be
applied as fixes.

Attachment: signature.asc
Description: PGP signature