qubes-linux-kernel/patches.fixes/dmar-fix-oops-with-no-dmar-table

26 lines
688 B
Plaintext
Raw Normal View History

From: Jeff Mahoney <jeffm@suse.com>
Subject: dmar: Fix oops with no DMAR table
References: bnc#548108
Patch-mainline: submitted 17 Mar 2010
On systems without a DMAR table and with DMAR enabled, we will oops
in dmar_ir_supported. This patch makes sure we actually have a DMAR
table before checking it.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
drivers/pci/dmar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -1460,5 +1460,5 @@ int __init dmar_ir_support(void)
{
struct acpi_table_dmar *dmar;
dmar = (struct acpi_table_dmar *)dmar_tbl;
- return dmar->flags & 0x1;
+ return dmar && dmar->flags & 0x1;
}