WSL2-Linux-Kernel/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
..
Kconfig
Makefile
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.c dmaengine: hidma: In hidma_prep_dma_memset treat value as a single byte 2022-04-20 17:28:12 +05:30
hidma.h
hidma_dbg.c
hidma_ll.c
hidma_mgmt.c
hidma_mgmt.h
hidma_mgmt_sys.c
qcom_adm.c dmaengine: qcom-adm: fix wrong calling convention for prep_slave_sg 2022-09-29 22:46:07 +05:30