diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-20 11:27:18 +0100 | 
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-20 11:27:18 +0100 | 
| commit | 4958134df54c2c84e9c22ea042761d439164d26e (patch) | |
| tree | 503177afab11f7d25b12a84ce25b481d305c51ba /lib/dma-debug.c | |
| parent | c4f528795d1add8b63652673f7262729f679c6c1 (diff) | |
| parent | c698ca5278934c0ae32297a8725ced2e27585d7f (diff) | |
Merge 4.16-rc6 into tty-next
We want the serial/tty fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/dma-debug.c')
| -rw-r--r-- | lib/dma-debug.c | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 1b34d210452c..7f5cdc1e6b29 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -1491,12 +1491,12 @@ void debug_dma_alloc_coherent(struct device *dev, size_t size,  	if (unlikely(virt == NULL))  		return; -	entry = dma_entry_alloc(); -	if (!entry) +	/* handle vmalloc and linear addresses */ +	if (!is_vmalloc_addr(virt) && !virt_addr_valid(virt))  		return; -	/* handle vmalloc and linear addresses */ -	if (!is_vmalloc_addr(virt) && !virt_to_page(virt)) +	entry = dma_entry_alloc(); +	if (!entry)  		return;  	entry->type      = dma_debug_coherent; @@ -1528,7 +1528,7 @@ void debug_dma_free_coherent(struct device *dev, size_t size,  	};  	/* handle vmalloc and linear addresses */ -	if (!is_vmalloc_addr(virt) && !virt_to_page(virt)) +	if (!is_vmalloc_addr(virt) && !virt_addr_valid(virt))  		return;  	if (is_vmalloc_addr(virt))  | 
