Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1416583 > unrolled thread
| Started by | Fabian Frederick <fabf@skynet.be> |
|---|---|
| First post | 2016-06-07 22:20 +0200 |
| Last post | 2016-06-07 22:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 1/1 linux-next] ACPI / extlog: avoid null pointer dereference Fabian Frederick <fabf@skynet.be> - 2016-06-07 22:20 +0200
| From | Fabian Frederick <fabf@skynet.be> |
|---|---|
| Date | 2016-06-07 22:20 +0200 |
| Subject | [PATCH 1/1 linux-next] ACPI / extlog: avoid null pointer dereference |
| Message-ID | <rHvDJ-7fg-47@gated-at.bofh.it> |
extlog_l1_addr was checked after assigning flags attribute.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
drivers/acpi/acpi_extlog.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index b3842ff..183b7b2 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -309,9 +309,10 @@ static void __exit extlog_exit(void)
{
set_edac_report_status(old_edac_report_status);
mce_unregister_decode_chain(&extlog_mce_dec);
- ((struct extlog_l1_head *)extlog_l1_addr)->flags &= ~FLAG_OS_OPTIN;
- if (extlog_l1_addr)
+ if (extlog_l1_addr) {
+ ((struct extlog_l1_head *)extlog_l1_addr)->flags &= ~FLAG_OS_OPTIN;
acpi_os_unmap_iomem(extlog_l1_addr, l1_size);
+ }
if (elog_addr)
acpi_os_unmap_iomem(elog_addr, elog_size);
release_mem_region(elog_base, elog_size);
--
2.1.4
Back to top | Article view | linux.kernel
csiph-web