projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61feb43
)
iommu/amd: Drop pasid_state reference in ppr_notifer error path
author
Joerg Roedel
<jroedel@suse.de>
Tue, 8 Jul 2014 12:55:10 +0000
(14:55 +0200)
committer
Joerg Roedel
<jroedel@suse.de>
Thu, 10 Jul 2014 13:36:40 +0000
(15:36 +0200)
In case we are not able to allocate a fault structure a
reference to the pasid_state will be leaked. Fix that by
dropping the reference in the error path in case we hold
one.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Tested-by: Oded Gabbay <Oded.Gabbay@amd.com>
drivers/iommu/amd_iommu_v2.c
patch
|
blob
|
history
diff --git
a/drivers/iommu/amd_iommu_v2.c
b/drivers/iommu/amd_iommu_v2.c
index 574c71bdfcfa26e0ce3e58da5e116df40837c467..6ba707b998ff136c8ca7cbdd83a0122342427ed5 100644
(file)
--- a/
drivers/iommu/amd_iommu_v2.c
+++ b/
drivers/iommu/amd_iommu_v2.c
@@
-607,6
+607,10
@@
static int ppr_notifier(struct notifier_block *nb, unsigned long e, void *data)
ret = NOTIFY_OK;
out_drop_state:
+
+ if (ret != NOTIFY_OK && pasid_state)
+ put_pasid_state(pasid_state);
+
put_device_state(dev_state);
out: