Re: [PATCH] dma: mv_xor: Fix a possible null-pointer dereference in mv_xor_prep_dma_xor()

2019-08-08 Thread Vinod Koul
On 27-07-19, 17:30, Jia-Ju Bai wrote: > In mv_xor_prep_dma_xor(), there is an if statement on line 577 to check > whether sw_desc is NULL: > if (sw_desc) > > When sw_desc is NULL, it is used on line 594: > dev_dbg(..., sw_desc, _desc->async_tx); > > Thus, a possible null-pointer

[PATCH] dma: mv_xor: Fix a possible null-pointer dereference in mv_xor_prep_dma_xor()

2019-07-27 Thread Jia-Ju Bai
In mv_xor_prep_dma_xor(), there is an if statement on line 577 to check whether sw_desc is NULL: if (sw_desc) When sw_desc is NULL, it is used on line 594: dev_dbg(..., sw_desc, _desc->async_tx); Thus, a possible null-pointer dereference may occur. To fix this bug, sw_desc is checked