From: Konrad Rzeszutek Wilk <konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
Cc: Sibren Vasse <sibren-DLwv2wemLo05ZU0pBKPMFg@public.gmane.org>,
michel-otUistvHUpPR7s880joybQ@public.gmane.org,
freedesktop-DLwv2wemLo05ZU0pBKPMFg@public.gmane.org,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH] swiotlb: clear io_tlb_start and io_tlb_end in swiotlb_exit
Date: Mon, 14 Jan 2019 15:25:13 -0500 [thread overview]
Message-ID: <20190114202513.GG32038@char.us.oracle.com> (raw)
In-Reply-To: <20190114201408.12270-1-hch-jcswGhMUV9g@public.gmane.org>
On Mon, Jan 14, 2019 at 09:14:08PM +0100, Christoph Hellwig wrote:
> 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.
>
> Fixes: 55897af63091 ("dma-direct: merge swiotlb_dma_ops into the dma_direct code")
> Reported-by: Sibren Vasse <sibren-DLwv2wemLo05ZU0pBKPMFg@public.gmane.org>
> Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
> Tested-by: Sibren Vasse <sibren-DLwv2wemLo05ZU0pBKPMFg@public.gmane.org>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Thank you!
> ---
> kernel/dma/swiotlb.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
> index d6361776dc5c..1fb6fd68b9c7 100644
> --- a/kernel/dma/swiotlb.c
> +++ b/kernel/dma/swiotlb.c
> @@ -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;
> }
> --
> 2.20.1
>
next prev parent reply other threads:[~2019-01-14 20:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-14 20:14 [PATCH] swiotlb: clear io_tlb_start and io_tlb_end in swiotlb_exit Christoph Hellwig
[not found] ` <20190114201408.12270-1-hch-jcswGhMUV9g@public.gmane.org>
2019-01-14 20:25 ` Konrad Rzeszutek Wilk [this message]
[not found] ` <20190114202513.GG32038-he5eyhs8q0BAdwtm4QZOy9BPR1lH4CV8@public.gmane.org>
2019-01-14 20:33 ` Christoph Hellwig
[not found] ` <20190114203323.GA11412-jcswGhMUV9g@public.gmane.org>
2019-01-16 14:57 ` Konrad Rzeszutek Wilk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190114202513.GG32038@char.us.oracle.com \
--to=konrad.wilk-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=freedesktop-DLwv2wemLo05ZU0pBKPMFg@public.gmane.org \
--cc=hch-jcswGhMUV9g@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=michel-otUistvHUpPR7s880joybQ@public.gmane.org \
--cc=sibren-DLwv2wemLo05ZU0pBKPMFg@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox