Commit 2c914aa
spi: cadence-qspi: fix pointer reference in runtime PM hooks
commit 32ce3bb upstream.
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().
Fixes: 2087e85 ("spi: cadence-quadspi: fix suspend-resume implementations")
Reviewed-by: Dhruva Gole <[email protected]>
Signed-off-by: Théo Lebrun <[email protected]>
Link: https://msgid.link/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Zhaoyang Li <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 55bf541 commit 2c914aa
1 file changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1775 | 1775 | | |
1776 | 1776 | | |
1777 | 1777 | | |
1778 | | - | |
1779 | 1778 | | |
1780 | 1779 | | |
1781 | | - | |
| 1780 | + | |
1782 | 1781 | | |
1783 | 1782 | | |
1784 | 1783 | | |
| |||
1789 | 1788 | | |
1790 | 1789 | | |
1791 | 1790 | | |
1792 | | - | |
1793 | 1791 | | |
1794 | 1792 | | |
1795 | 1793 | | |
| |||
1798 | 1796 | | |
1799 | 1797 | | |
1800 | 1798 | | |
1801 | | - | |
| 1799 | + | |
1802 | 1800 | | |
1803 | 1801 | | |
1804 | 1802 | | |
| |||
0 commit comments