From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH UPSTREAM] xen-swiotlb: fix the check condition for xen_swiotlb_free_coherent To: Greg KH Cc: Konrad Rzeszutek Wilk , John Sobecki , "linux-kernel@vger.kernel.org" , "xen-devel@lists.xenproject.org" , ASHISH_B_SRIVASTAVA , stable@vger.kernel.org References: <25d8a709-9f2f-fe09-f66c-2a0704ddbbb0@oracle.com> <20180517191003.GD504@kroah.com> From: Joe Jin Message-ID: Date: Thu, 17 May 2018 12:32:37 -0700 MIME-Version: 1.0 In-Reply-To: <20180517191003.GD504@kroah.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: On 5/17/18 12:10 PM, Greg KH wrote: > On Thu, May 17, 2018 at 11:45:57AM -0700, Joe Jin wrote: >> When run raidconfig from Dom0 we found that the Xen DMA heap is reduced, >> but Dom Heap is increased by the same size. Tracing raidconfig we found >> that the related ioctl() in megaraid_sas will call dma_alloc_coherent() >> to apply memory. If the memory allocated by Dom0 is not in the DMA area, >> it will exchange memory with Xen to meet the requiment. Later drivers >> call dma_free_coherent() to free the memory, on xen_swiotlb_free_coherent() >> the check condition (dev_addr + size - 1 <= dma_mask) is always false, >> it prevents calling xen_destroy_contiguous_region() to return the memory >> to the Xen DMA heap. >> >> This issue introduced by commit 6810df88dcfc2 "xen-swiotlb: When doing >> coherent alloc/dealloc check before swizzling the MFNs.". >> >> Signed-off-by: Joe Jin >> Tested-by: John Sobecki >> Reviewed-by: Rzeszutek Wilk >> Cc: stable@vger.kernel.org >> --- >> drivers/xen/swiotlb-xen.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > What does "PATCH UPSTREAM" mean? Oops I forgot to remove UPSTREAM, the tag for internal review. Sorry for this, will resend it without the tag. Thanks, Joe > > confused, > > greg k-h >