swiotlb: clear io_tlb_start and io_tlb_end in swiotlb_exit
PATCH 1/1 swiotlb: clear io_tlb_start and io_tlb_end in swiotlb_exit
Otherwise is_swiotlb_buffer will return false positives when we first initialize a swiotlb buffer, but then free it because we have an IOMMU available.
--- kernel/dma/swiotlb.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/dma/swiotlb.c +2 -0
@@ -378,6 +378,8 @@ void __init swiotlb_exit(void)memblock_free_late (io_tlb_start,PAGE_ALIGN (io_tlb_nslabs <<IO_TLB_SHIFT )); } + io_tlb_start =0 ; + io_tlb_end =0 ; io_tlb_nslabs =0 ; max_segment =0 ; }
Signature · 1 line
2.20.1
A message that is not in the archive (sent off-list or not yet received): [email protected]
Konrad Rzeszutek Wilk
Reviewed-byQuoted 8 lines · Christoph Hellwig
Otherwise
is_swiotlb_bufferwill return false positives when we first initialize a swiotlb buffer, but then free it because we have an IOMMU available.Fixes 55897af63091 ("dma-direct: merge swiotlb_dma_ops into the dma_direct code")Reported-by Sibren Vasse <[email protected]>Signed-off-by Christoph Hellwig <[email protected]>Tested-by Sibren Vasse <[email protected]>
Thank you!
Quoted 20 lines
--- kernel/dma/swiotlb.c | 2 ++ 1 file changed, 2 insertions(+)kernel/dma/swiotlb.c +2
-0@@ -378,6 +378,8 @@ void __init swiotlb_exit(void)memblock_free_late (io_tlb_start,PAGE_ALIGN (io_tlb_nslabs <<IO_TLB_SHIFT )); } + io_tlb_start =0 ; + io_tlb_end =0 ; io_tlb_nslabs =0 ; max_segment =0 ; }Signature · 1 line
2.20.1
A message that is not in the archive (sent off-list or not yet received): 20190114202513.GG32038-he5eyhs8q0BAdwtm4QZOy9BPR1lH4CV8@public.gmane.org
Quoted 11 lines · Konrad Rzeszutek Wilk
Quoted 8 lines · Christoph Hellwig
Otherwise
is_swiotlb_bufferwill return false positives when we first initialize a swiotlb buffer, but then free it because we have an IOMMU available.Fixes 55897af63091 ("dma-direct: merge swiotlb_dma_ops into the dma_direct code")Reported-by Sibren Vasse <[email protected]>Signed-off-by Christoph Hellwig <[email protected]>Tested-by Sibren Vasse <[email protected]>Reviewed-by Konrad Rzeszutek Wilk <[email protected]>
Do you want to send this to Linus, or do you want me to pick it up through the dma-mapping tree?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · Christoph Hellwig
Quoted 10 lines · Konrad Rzeszutek Wilk
Quoted 8 lines · Christoph Hellwig
Otherwise
is_swiotlb_bufferwill return false positives when we first initialize a swiotlb buffer, but then free it because we have an IOMMU available.Fixes 55897af63091 ("dma-direct: merge swiotlb_dma_ops into the dma_direct code")Reported-by Sibren Vasse <[email protected]>Signed-off-by Christoph Hellwig <[email protected]>Tested-by Sibren Vasse <[email protected]>
Quoted 4 lines
Quoted 1 line
Reviewed-by Konrad Rzeszutek Wilk <[email protected]>Do you want to send this to Linus, or do you want me to pick it up through the dma-mapping tree?
I will do it. Thanks!