aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2013-05-17 10:37:59 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-05-22 03:45:56 -0400
commitabd9a0c36028771a8f397f38bf79bfcf404f957f (patch)
tree4c05aa888c674b1caef7d3ef5afa7a53e4fb1d40 /arch/s390
parent519fe2ecb755b875d9814cdda19778c2e88c6901 (diff)
s390/dma: do not call debug_dma after free
In dma_free_coherent call debug_dma_free_coherent before deallocating the memory to avoid a possible use after free. Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/dma-mapping.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/include/asm/dma-mapping.h b/arch/s390/include/asm/dma-mapping.h
index 9411db653bac..886ac7d4937a 100644
--- a/arch/s390/include/asm/dma-mapping.h
+++ b/arch/s390/include/asm/dma-mapping.h
@@ -71,8 +71,8 @@ static inline void dma_free_coherent(struct device *dev, size_t size,
71{ 71{
72 struct dma_map_ops *dma_ops = get_dma_ops(dev); 72 struct dma_map_ops *dma_ops = get_dma_ops(dev);
73 73
74 dma_ops->free(dev, size, cpu_addr, dma_handle, NULL);
75 debug_dma_free_coherent(dev, size, cpu_addr, dma_handle); 74 debug_dma_free_coherent(dev, size, cpu_addr, dma_handle);
75 dma_ops->free(dev, size, cpu_addr, dma_handle, NULL);
76} 76}
77 77
78#endif /* _ASM_S390_DMA_MAPPING_H */ 78#endif /* _ASM_S390_DMA_MAPPING_H */