From: Joerg Roedel <joerg.roedel@amd.com>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: mingo@elte.hu, x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] x86: amd_iommu, fix lock imbalance
Date: Wed, 3 Jun 2009 10:36:42 +0200 [thread overview]
Message-ID: <20090603083642.GB22359@amd.com> (raw)
In-Reply-To: <1243497289-18591-2-git-send-email-jirislaby@gmail.com>
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@gmail.com>
> Cc: Joerg Roedel <joerg.roedel@amd.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
next prev parent reply other threads:[~2009-06-03 8:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 7:54 [PATCH 1/3] x86: apic, restore irqs on fail paths Jiri Slaby
2009-05-28 7:54 ` [PATCH 2/3] x86: amd_iommu, fix lock imbalance Jiri Slaby
2009-06-03 8:36 ` Joerg Roedel [this message]
2009-05-28 7:54 ` [PATCH 3/3] trace: events_filter, fix lock imbalances Jiri Slaby
2009-05-29 1:14 ` Li Zefan
2009-05-29 15:57 ` Jiri Slaby
2009-05-29 17:21 ` [PATCH 1/3] x86: apic, restore irqs on fail paths Cyrill Gorcunov
2009-06-02 0:51 ` [tip:irq/numa] x86, apic: Restore " tip-bot for Jiri Slaby
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=20090603083642.GB22359@amd.com \
--to=joerg.roedel@amd.com \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=x86@kernel.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