Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1423060

Re: [patch] drivers/iommu: Fix iova DEBUG_PREEMPT splat

From "Cc: Joerg Roedel" <joro@8bytes.org>
Newsgroups linux.kernel
Subject Re: [patch] drivers/iommu: Fix iova DEBUG_PREEMPT splat
Date 2016-06-15 16:10 +0200
Message-ID <rKjG2-3xJ-25@gated-at.bofh.it> (permalink)
References <rJzDb-6p5-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jun 13, 2016 at 02:56:36PM +0200, Mike Galbraith wrote:
> 
> Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com>
> Cc: Joerg Roedel <joro@8bytes.org>
> ---
>  drivers/iommu/iova.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> --- a/drivers/iommu/iova.c
> +++ b/drivers/iommu/iova.c
> @@ -749,8 +749,9 @@ static bool __iova_rcache_insert(struct
>  	bool can_insert = false;
>  	unsigned long flags;
>  
> +	local_irq_save(flags);
>  	cpu_rcache = this_cpu_ptr(rcache->cpu_rcaches);
> -	spin_lock_irqsave(&cpu_rcache->lock, flags);
> +	spin_lock(&cpu_rcache->lock);
>  
>  	if (!iova_magazine_full(cpu_rcache->loaded)) {
>  		can_insert = true;
> @@ -812,8 +813,9 @@ static unsigned long __iova_rcache_get(s
>  	bool has_pfn = false;
>  	unsigned long flags;
>  
> +	local_irq_save(flags);
>  	cpu_rcache = this_cpu_ptr(rcache->cpu_rcaches);
> -	spin_lock_irqsave(&cpu_rcache->lock, flags);
> +	spin_lock(&cpu_rcache->lock);
>  
>  	if (!iova_magazine_empty(cpu_rcache->loaded)) {
>  		has_pfn = true;

From an earlier patch submitted by Sagar (Cc'ed) I think the right fix
is to just make the code use get_cpu_ptr/put_cpu_ptr instead of
this_cpu_ptr.


	Joerg

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[patch] drivers/iommu: Fix iova DEBUG_PREEMPT splat Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-06-13 15:00 +0200
  Re: [patch] drivers/iommu: Fix iova DEBUG_PREEMPT splat "Cc: Joerg Roedel" <joro@8bytes.org> - 2016-06-15 16:10 +0200

csiph-web