projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bdddadc
)
iommu/amd: Fix possible use after free in get_irq_table()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Tue, 2 Oct 2012 08:34:40 +0000
(11:34 +0300)
committer
Joerg Roedel
<joerg.roedel@amd.com>
Tue, 2 Oct 2012 10:08:07 +0000
(12:08 +0200)
We should return NULL on error instead of the freed pointer.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/amd_iommu.c
patch
|
blob
|
history
diff --git
a/drivers/iommu/amd_iommu.c
b/drivers/iommu/amd_iommu.c
index
312dd4d
..
ff16c5e
100644
(file)
--- a/
drivers/iommu/amd_iommu.c
+++ b/
drivers/iommu/amd_iommu.c
@@
-3865,6
+3865,7
@@
static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic)
table->table = kmem_cache_alloc(amd_iommu_irq_cache, GFP_ATOMIC);
if (!table->table) {
kfree(table);
+ table = NULL;
goto out;
}