diff options
author | Nikita Zhandarovich <n.zhandarovich@fintech.ru> | 2023-04-17 16:32:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-26 15:30:09 +0300 |
commit | d866221cbb45c1f53cad31f093ee1e8d0256127b (patch) | |
tree | 4c820733f3a8fa3ae4147ab7ac076c05797fbabe /net/lapb/lapb_timer.c | |
parent | fedd67003d6fd0efc43e085d5e0e8b4552272502 (diff) | |
download | linux-d866221cbb45c1f53cad31f093ee1e8d0256127b.tar.xz |
ASoC: fsl_asrc_dma: fix potential null-ptr-deref
commit 86a24e99c97234f87d9f70b528a691150e145197 upstream.
dma_request_slave_channel() may return NULL which will lead to
NULL pointer dereference error in 'tmp_chan->private'.
Correct this behaviour by, first, switching from deprecated function
dma_request_slave_channel() to dma_request_chan(). Secondly, enable
sanity check for the resuling value of dma_request_chan().
Also, fix description that follows the enacted changes and that
concerns the use of dma_request_slave_channel().
Fixes: 706e2c881158 ("ASoC: fsl_asrc_dma: Reuse the dma channel if available in Back-End")
Co-developed-by: Natalia Petrova <n.petrova@fintech.ru>
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20230417133242.53339-1-n.zhandarovich@fintech.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions