[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090603083642.GB22359@amd.com>
Date: Wed, 3 Jun 2009 10:36:42 +0200
From: Joerg Roedel <joerg.roedel@....com>
To: Jiri Slaby <jirislaby@...il.com>
CC: mingo@...e.hu, x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] x86: amd_iommu, fix lock imbalance
On Thu, May 28, 2009 at 09:54:48AM +0200, Jiri Slaby wrote:
> In alloc_coherent there is an omitted unlock on the path where mapping
> fails. Add the unlock.
>
> Signed-off-by: Jiri Slaby <jirislaby@...il.com>
> Cc: Joerg Roedel <joerg.roedel@....com>
> ---
> arch/x86/kernel/amd_iommu.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
> index a97db99..b123e20 100644
> --- a/arch/x86/kernel/amd_iommu.c
> +++ b/arch/x86/kernel/amd_iommu.c
> @@ -1537,8 +1537,10 @@ static void *alloc_coherent(struct device *dev, size_t size,
> *dma_addr = __map_single(dev, iommu, domain->priv, paddr,
> size, DMA_BIDIRECTIONAL, true, dma_mask);
>
> - if (*dma_addr == bad_dma_address)
> + if (*dma_addr == bad_dma_address) {
> + spin_unlock_irqrestore(&domain->lock, flags);
> goto out_free;
> + }
>
> iommu_completion_wait(iommu);
Applied to amd-iommu/fixes. Thanks Jiri.
--
| Advanced Micro Devices GmbH
Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei München
System |
Research | Geschäftsführer: Thomas M. McCoy, Giuliano Meroni
Center | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
| Registergericht München, HRB Nr. 43632
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists