linux/drivers/dma/qcom
Christian Marangi b9d2140c3b dmaengine: qcom-adm: fix wrong calling convention for prep_slave_sg
The calling convention for pre_slave_sg is to return NULL on error and
provide an error log to the system. Qcom-adm instead provide error
pointer when an error occur. This indirectly cause kernel panic for
example for the nandc driver that checks only if the pointer returned by
device_prep_slave_sg is not NULL. Returning an error pointer makes nandc
think the device_prep_slave_sg function correctly completed and makes
the kernel panics later in the code.

While nandc is the one that makes the kernel crash, it was pointed out
that the real problem is qcom-adm not following calling convention for
that function.

To fix this, drop returning error pointer and return NULL with an error
log.

Fixes: 03de6b2738 ("dmaengine: qcom-adm: stop abusing slave_id config")
Fixes: 5c9f8c2dbd ("dmaengine: qcom: Add ADM driver")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Cc: stable@vger.kernel.org # v5.11+
Link: https://lore.kernel.org/r/20220916041256.7104-1-ansuelsmth@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2022-09-29 22:46:07 +05:30
..
bam_dma.c dmaengine: qcom: bam_dma: fix runtime PM underflow 2022-07-01 16:33:36 +05:30
gpi.c dmaengine: qcom: gpi: move read_lock_bh to read_lock in tasklet 2022-09-29 12:21:33 +05:30
hidma_dbg.c dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
hidma_ll.c dmaengine: qcom: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:07 +05:30
hidma_mgmt_sys.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
hidma_mgmt.c dmaengine: qcom_hidma: comment platform_driver_register call 2021-05-13 18:32:29 +02:00
hidma_mgmt.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
hidma.c dmaengine: hidma: In hidma_prep_dma_memset treat value as a single byte 2022-04-20 17:28:12 +05:30
hidma.h dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
Kconfig dmaengine: QCOM_HIDMA_MGMT depends on HAS_IOMEM 2021-05-31 09:44:14 +05:30
Makefile dmaengine: qcom: Add GPI dma driver 2020-11-24 21:42:07 +05:30
qcom_adm.c dmaengine: qcom-adm: fix wrong calling convention for prep_slave_sg 2022-09-29 22:46:07 +05:30