Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180084
b: refs/heads/master
c: 2ca7627
h: refs/heads/master
v: v3
  • Loading branch information
Joerg Roedel committed Jan 22, 2010
1 parent 8914086 commit 6b70a4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d91afd15b041f27d34859c79afa9e172018a86f4
refs/heads/master: 2ca762790caf822f7b61430fbaffa3ae4219977f
7 changes: 5 additions & 2 deletions trunk/arch/x86/kernel/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1489,11 +1489,14 @@ static void __detach_device(struct device *dev)
{
struct iommu_dev_data *dev_data = get_dev_data(dev);
struct iommu_dev_data *alias_data;
struct protection_domain *domain;
unsigned long flags;

BUG_ON(!dev_data->domain);

spin_lock_irqsave(&dev_data->domain->lock, flags);
domain = dev_data->domain;

spin_lock_irqsave(&domain->lock, flags);

if (dev_data->alias != dev) {
alias_data = get_dev_data(dev_data->alias);
Expand All @@ -1504,7 +1507,7 @@ static void __detach_device(struct device *dev)
if (atomic_dec_and_test(&dev_data->bind))
do_detach(dev);

spin_unlock_irqrestore(&dev_data->domain->lock, flags);
spin_unlock_irqrestore(&domain->lock, flags);

/*
* If we run in passthrough mode the device must be assigned to the
Expand Down

0 comments on commit 6b70a4d

Please sign in to comment.