Skip to content

Commit

Permalink
iommu/amd: Add missing spin_lock initialization
Browse files Browse the repository at this point in the history
Add missing spin_lock initialization in
amd_iommu_bind_pasid() function and make lockdep happy
again.

Cc: stable@vger.kernel.org # >= v3.3
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
  • Loading branch information
Joerg Roedel committed Jul 19, 2012
1 parent 3775d48 commit 2c13d47
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/iommu/amd_iommu_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,8 @@ int amd_iommu_bind_pasid(struct pci_dev *pdev, int pasid,

atomic_set(&pasid_state->count, 1);
init_waitqueue_head(&pasid_state->wq);
spin_lock_init(&pasid_state->lock);

pasid_state->task = task;
pasid_state->mm = get_task_mm(task);
pasid_state->device_state = dev_state;
Expand Down

0 comments on commit 2c13d47

Please sign in to comment.