Peter Ujfalusi fdfd8f9ef2 dmaengine: virt-dma: Fix access after free in vchan_complete()
commit 24461d9792c2c706092805ff1b067628933441bd upstream.

vchan_vdesc_fini() is freeing up 'vd' so the access to vd->tx_result is
via already freed up memory.

Move the vchan_vdesc_fini() after invoking the callback to avoid this.

Fixes: 09d5b702b0f97 ("dmaengine: virt-dma: store result on dma descriptor")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20191220131100.21804-1-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-09 10:20:00 +01:00
..
2019-06-08 12:46:31 -07:00
2019-07-17 09:55:43 -07:00
2019-09-17 19:04:40 -07:00
2019-07-17 09:55:43 -07:00
2019-07-17 09:55:43 -07:00
2019-09-17 19:04:40 -07:00
2019-07-17 09:55:43 -07:00
2019-07-17 09:55:43 -07:00
2019-07-17 09:55:43 -07:00
2019-09-17 19:04:40 -07:00
2019-09-22 09:30:30 -07:00
2019-07-30 10:41:53 -07:00
2019-07-17 09:55:43 -07:00
2019-07-17 09:55:43 -07:00
2019-07-17 09:55:43 -07:00
2019-07-17 09:55:43 -07:00
2019-07-17 09:55:43 -07:00
2019-09-17 19:04:40 -07:00
2019-07-17 09:55:43 -07:00